WebKit needs to support aria-posinset and aria-setsize http://www.w3.org/TR/wai-aria/states_and_properties#aria-posinset http://www.w3.org/TR/wai-aria/states_and_properties#aria-setsize
Created attachment 188138 [details] patch
This is pretty straightforward. Just expose these ARIA attributes so that a screen reader can output something expected
Comment on attachment 188138 [details] patch On Windows and GTK, I believe that the position in set and set size are supposed to be exposed for any list item, not just those with an ARIA override. So each item in a simple <ul>, for example, would have a default position in set. Would it confuse VoiceOver if these were exposed on each list item when ARIA is not used? If not, my preference would be to remove the ARIA from the method names, and provide default implementations for list items and listbox options. View in context: https://bugs.webkit.org/attachment.cgi?id=188138&action=review > Source/WebCore/accessibility/AccessibilityObject.h:521 > + int ariaPosInset() const; I'd capitalize this ariaPosInSet, since it's short for "position in set"
(In reply to comment #3) > (From update of attachment 188138 [details]) > On Windows and GTK, I believe that the position in set and set size are > supposed to be exposed for any list item, not just those with an ARIA override. > So each item in a simple <ul>, for example, would have a default position in > set. For the case of GTK, the way a position of a given object in a container/parent is exposed through atk_object_get_n_accessible_children and atk_object_get_index_in_parent, which basically handle positions in the currently exposed a11y tree. No ARIA stuff is involved at all there, afaik. > Would it confuse VoiceOver if these were exposed on each list item when ARIA is > not used? > > If not, my preference would be to remove the ARIA from the method names, and > provide default implementations for list items and listbox options. Not sure if I fully understood your suggestion, Dominic, so please take the following with a grain of salt: I wonder if it's really a good idea to mix what these ARIA properties [1] mean (not the "visual position" of elements in a visible set of items) with what the current ways to check the "position in parent" for a given object mean. So, I think it's perhaps a better idea to keep them as separated concepts at the level of AccessibilityObject and let the platforms merge them or not at their will. [1] http://www.w3.org/TR/wai-aria/states_and_properties
Case-sensitivity: AXARIAPosInset should probably be AXARIAPosInSet Since it stands for "position in set" not "position inset"…
OK, if there's only one platform that exposes a generic attribute like that, this implementation makes sense. One last thought: should supportsAriaPosInSet and supportsAriaSetSize only return true when the role is appropriate? The ARIA spec makes it pretty clear that these are only intended for certain roles, perhaps we should enforce that.
(In reply to comment #6) > One last thought: should supportsAriaPosInSet and supportsAriaSetSize only return true when the role is appropriate? The ARIA spec makes it pretty clear that these are only intended for certain roles, perhaps we should enforce that. The spec never states that UAs "MUST NOT" expose it elsewhere, so I'd err on the side of exposing it any time it is defined. This is especially true b/c the 1.0 spec clearly has an error in that it lists it for use on listem and option, but this was also intended for: 1. rows in vertical grids and treegrids 2. groups and treeitems in trees 3. gridcells, columnheaders, and rowheaders in horizontal scrolling grids (rare, but possible)
(In reply to comment #7) > 1. rows in vertical grids and treegrids > 3. gridcells, columnheaders, and rowheaders in horizontal scrolling grids (rare, but possible) I'd prefer if we added aria-colindex and aria-rowindex attributes, rather than reuse aria-posinset to mean row index when there's no equivalent for col index.
(In reply to comment #8) > I'd prefer if we added aria-colindex and aria-rowindex attributes, rather than reuse aria-posinset to mean row index when there's no equivalent for col index. Will you add that comment to PFWG-ISSUE-398? https://www.w3.org/WAI/PF/Group/track/issues/398
(In reply to comment #9) > Will you add that comment to PFWG-ISSUE-398? > https://www.w3.org/WAI/PF/Group/track/issues/398 Will do. I don't want to take this bug off topic anymore - I'm happy with this patch once capitalization is fixed.
Created attachment 189649 [details] patch
Comment on attachment 189649 [details] patch Attachment 189649 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/16689487
Created attachment 189651 [details] patch
Comment on attachment 189649 [details] patch Attachment 189649 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/16693452
Comment on attachment 189651 [details] patch Attachment 189651 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16694501 New failing tests: platform/mac/accessibility/aria-setsize-posinset.html
Created attachment 189680 [details] patch
http://trac.webkit.org/changeset/144858