Bug 132349 - AX: [ATK] text inside span block in a block not accessible
Summary: AX: [ATK] text inside span block in a block not accessible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, InRadar
Depends on:
Blocks: 25531
  Show dependency treegraph
 
Reported: 2014-04-29 12:28 PDT by Jarek Czekalski
Modified: 2014-06-13 09:13 PDT (History)
10 users (show)

See Also:


Attachments
fix for span block v1.00 (5.13 KB, patch)
2014-06-08 01:15 PDT, Jarek Czekalski
no flags Details | Formatted Diff | Diff
fix for span block v1.01 (6.06 KB, patch)
2014-06-09 12:53 PDT, Jarek Czekalski
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jarek Czekalski 2014-04-29 12:28:59 PDT
<div>
<div>Before</div>
<a style="display:block;" href="xref">
<span style="display:block;">Span</span>
</a>
<div>After</div>
</div>

In this example Span text is not accessible. The link is not ATK_TEXT. This is related to bug #130941 and these 2 bugs together make yelp gnome documentation partially inaccessible.

Test case to come soon.
Comment 1 Radar WebKit Bug Importer 2014-04-29 12:29:18 PDT
<rdar://problem/16759234>
Comment 2 Jarek Czekalski 2014-06-08 01:15:54 PDT
Created attachment 232681 [details]
fix for span block v1.00

When atk interfaces are considered getInterfaceMaskFromObject (accessibility/atk/WebKitAccessibleWrapperAtk.cpp), then all divs are given (roleIsTextType). Seems like all links may also be given this interface. I don't see any counterexample. So this is what the one-liner patch does.

The patch also tested on 2.4 branch.
Comment 3 Mario Sanchez Prada 2014-06-09 02:34:30 PDT
Comment on attachment 232681 [details]
fix for span block v1.00

View in context: https://bugs.webkit.org/attachment.cgi?id=232681&action=review

The patch looks good to me, but I have a suggestion to improve the test before landing. See below...

> LayoutTests/platform/gtk/accessibility/text-in-span-block-in-a-block.html:14
> +    <span style="display:block;">text1</span>

I think it would be interesting to place some text before and after the <span> *and* inside the scope of the <a> elements (for all the three cases), and then check that the full text (including the text inside the span and those 'before' and 'after' bits) will be returned when calling element.stringValue.

The purpose of this suggestion  is to ensure that the implementation of AtkText for those links whose children are not inline (because of the 'display: block' thing) is still returning the full 'flattened' text for all the block children (the 'before' and 'after' will be part of generated block elements) inside of it.

Other than this (and assuming that that extended version of the test will still pass), I don't have any other comment on the patch.
Comment 4 Jarek Czekalski 2014-06-09 12:53:13 PDT
Created attachment 232723 [details]
fix for span block v1.01

Hi Mario

>I think it would be interesting to place some text before and after [...]

There are countless configurations possible. I chose three of them and I hope this set is sufficient for you :)
Small rebuild of test script was needed to keep it friendly.

Thanks for the immediate review!
Comment 5 Mario Sanchez Prada 2014-06-13 08:43:04 PDT
Comment on attachment 232723 [details]
fix for span block v1.01

(In reply to comment #4)
> Created an attachment (id=232723) [details]
> fix for span block v1.01
> 
> Hi Mario
> 
> >I think it would be interesting to place some text before and after [...]
> 
> There are countless configurations possible. I chose three of them and I hope this set is sufficient for you :)
> Small rebuild of test script was needed to keep it friendly.
> 

Hi Jarek, apologies for taking so much time to review this (it fell off my radar somehow), and thanks for considering my comments and incorporating them in the new patch. LGTM now
Comment 6 WebKit Commit Bot 2014-06-13 09:12:56 PDT
Comment on attachment 232723 [details]
fix for span block v1.01

Clearing flags on attachment: 232723

Committed r169936: <http://trac.webkit.org/changeset/169936>
Comment 7 WebKit Commit Bot 2014-06-13 09:13:01 PDT
All reviewed patches have been landed.  Closing bug.