-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does 2.4.11 apply to active descendants of a combobox? #2237
Comments
this situation (that "focused" doesn't necessarily mean "the element that represents i think long story short is that SCs mean "focus" in the more general "logical" sense, whatever the user perceives/understands as having focus. not necessarily the programmatic element that the browser thinks has focus (which yes, will make automated testing "interesting", as there may even be fully custom implementations of things - think |
but more specifically to your point about |
I think we're sort of trying to have it both ways here Patrick. That seems a little off to me. On the one hand I've been hearing that focus is a state, so 1.4.11 can be applied to focus, and that it'd need to be programmatic (4.1.2). But then I'm also hearing people argue that focus should be seen as something independent so that we can apply 2.4.11 to active descendants. I think it might make more sense for focus to be a programmatic state, and adjust the new SC so that it also applies to active descendants in some way. |
are we? where? (i admit i've lost track of where the very latest thinking/wording on 2.4.11 is)
and from an automated testing perspective, that would certainly make sense. but it may well come at the expense of being logical / relating to a user's actual experience / applying to various other situations (like the |
Well, the way I understand this:
The way I see this either focus is a state, and it therefor must be programmatic, or it isn't and therefor 1.4.11 doesn't apply to it. |
1.4.11 and 2.4.11 deal with something visual, so there when talking about "focus" is refers to what a sighted user would assume is the control (which does not necessarily match whatever happens under the hood / programmatically) if there's a reasonable way to disumbiguate this in understanding (in a similar way to that discussion ages ago the "when we say 'label' we don't necessarily mean |
@WilcoFiers can you point me to where you make this inference? I believe I have been following most of the conversations around
I feel like this is a bit reversed. If focus is a (possible) programmatic state, then both 4.1.2 and 1.4.11 apply. If focus is not a programmatic state (or not possible for a particular UIC), 4.1.2 and 1.4.11 might have other implications for the UIC. |
Agree with @patrickhlauke that the Understanding documents of 2.4.7, 1.4.11, 2.4.11 and 2.4.12 should indicate that for certain elements the focus visibility refers to the active entry (option, gridcell, treeitem, menuitem etc.). In my opinion, the question is open whether always the whole element (listbox, combobox, grid, tree, menu etc.) needs a focus indicator. If not, it should be noted that often the selected item is identical to the focused item (e.g. single select listbox). |
Some observations that may be helpful: based on Example 1: List Autocomplete with Manual Selection tested using
when the edit box has keyboard focus
when an
UIA states for
|
The special characteristic of comboboxes is that the focus can actually be in two places at the same time:
In the example examined by @stevefaulkner, the focus is always in the input field from the browser's point of view. Only aria-activedescendant causes a different information to be transmitted to the Accessibility API. |
I see this as related to my question about what is a "user interface control" (UIC) really? That would define the size. Previously we have tried to define focus: So from that definition (if we end up using it) then I'd say yes active descendants are covered. And, from a user point of view, that would be the logical approach. Reviewing previous uses of UIC, I don't think it has mattered that much for previous SCs. For example, for a UIC to be keyboard accessible it doesn't matter whether you consider active descendants as separate or not, it works in either interpretation. However, when we are calculating size that becomes an issue! I don't think we should assume people know/understand that there can be two forms of focus for some components. |
The normative text now includes: So it allows for either the parent UIC and/or the child components. There is a new section of the understanding document which addresses this and tries to differentiate focus from selection. Assuming the change passes next week, I'll close this issue. |
I agree with the intent. I like the suggested change. I am not clear where the option is being slotted in.
If that is in Understanding, everything is well and good. It will be problematic for Another phrasing approach which might work is permitted or allowable. I understand the intent is to give the author a choice for passing the SC, and not to give an auditor an excuse for failing the SC. E.g.:
Current:
Another suggestion:
The above only works if this Understanding. It is too loose for the SC. |
@bruce-usab this is actually part of the normative text (and was reviewed on last week's call). On Friday's wcag 2.x backlog call, I led us through an exercise in how we need to let it be "can" because it is entirely possible to have the focus indicator only around the whole and have clear focus appearance. Here's an example of a radio button group where this is the case. If you compare to a typical radio button group, you'll notice that there is a focus indicator around the selection state as well. That is arguably a clearer interaction, but I hope you'll agree that in the example provided, the interaction is clear. Where the selection state is essentially providing a point of interaction but cannot be considered the focus. In such a case, the selection state still needs to meet 3:1 through Non-Text Contrast. I will be adding more context in the Understanding document on this. |
I absolutely agree with @mbgower – please try crafting a version that makes it unambiguous that the Something we have also done with some 2.1/2.2 SC is have an exception following the SC. For this SC, that approach might allow the main body of the SC to simpler (since it would not have to mention subcomponents at all). With this approach, at the end of the SC, we might have an exception similar to the following:
|
@bruce-usab From my review, I don't think we can comprehensively say it is 'best practice' or even 'preferred' to have focus go to the sub-component. Here are some concrete examples to further illustrate that: SelectA A focus indicator has to occur on the unopened (or pre-opened) select component itself, but there is never any need for a focus indicator to exist on an open select's subcomponents because the selection state alone (assuming it meets 3:1) is entirely adequate. Here, Chrome adds a blue focus indicator around the whole, and also makes the unfocused gray selection state of the item called "Saab" become blue (ignoring that Chrome's default contrast for selection has not improved). However, a multi-select MUST have a separate focus indicator to allow someone to differentiate between a selected item and the item that has focus. Here are two views of that, one showing the focus on "Fiat" while "Saab" is selected; the other showing both focus and selection on the "Saab" item as I traverse through it. In both instances, the same dark blue indicator that surrounds the whole select element is also used on the item with focus. It meets 3:1 contrast against both the selected and unselected items. Radio (and other) groupsAs mentioned above, a radio group that has a focus indicator has no need for a focus indicator on individual buttons. Most browsers add a redundant focus indicator around the radio button as well. But only one radio button can ever be selected, so if there is a group focus around the whole it is entirely adequate. Star ratingAs demonstrated in the star-selection in my prior comment, trying to put a focus indicator around the subcomponent in a star rating system that allows half stars to be chosen could create an extremely odd design interaction. Where there is a group focus indicator, it is clear when you are and are not interacting with the start rating. Here is a 5-star rating system, currently with 2.5 stars selected, with and without a dark blue focus indicator around the whole. In summary, a component is always going to need a focus indicator with our current language, and in many circumstances, the focus going to the sub-component is going to make sense. But there are so many possible design options, that I do not think we can say it is best practice or preferred that the subcomponent should take the focus indicator. I think the "can...instead" wording we have creates enough accommodation for this. |
I am (also) happy for us not to say preferred or best practice. My only concern is that this will be the first |
There is no "may" or "might" language. There is "can" and "instead". We do use both "at least" and "can" in 1.1.1
Many SCs use "can" either in the preamble or the exceptions. I count over a dozen occurrences, often but not only in this form:
I find Keyboard Trap is on similar 'loose' ground to what we're doing:
I think I understand the concern that "can" in most of these circumstances probably should have been "must". |
In 1.1.1 and 1.3.1. use of In 2.1.2 Keyboard Trap I realize the current prose is not literally using may or might. But with the current phrasing of this SC, |
There is the possibility of making the entire final paragraph another exception bullet.... @bruce-usab it seems like you may have been suggesting that. If such was done, would the current wording be acceptable? We'd have to think that through carefully. |
i.e.:
|
@mbgower – I don't have clarity as to where the the current complete wording of the SC may be found. Please provide. I would be pleased to take a pass at formatting the option as an exception. I will not include preferred or best practice. Is it okay for me to reply back to this thread? Would a pull request be better? |
@bruce-usab I think this is most current with my PR: |
Okay, I think the fix is easy then. Just change the concluding paragraph to another exception bullet (and avoid Current
Proposed
Also I would recommend moving the example (for example, an opened drop-down menu shows a list of menu items) into the note. |
An attempt to address the concerns expressed for the later comments in #2237. The closing paragraph has become a final exception bullet. A note has been added providing an example as well as information on selection versus focused.
@bruce-usab I've made a new PR that attempts all those things. I believe with the rewording and the added information in the note on selection, that we may be able to more emphatically say that where sub-components have a focus indicator, it must meet these requirements. |
Rewording does not seem to provide page author/owner a choice. I commented in PR. |
* Update focus-appearance-minimum.html An attempt to address the concerns expressed for the later comments in #2237. The closing paragraph has become a final exception bullet. A note has been added providing an example as well as information on selection versus focused. * Update focus-appearance-minimum.html fixed a missing word and tweaked at same time * Update focus-appearance-minimum.html Added the changes to the SC as well as the Understanding document * Update focus-appearance-minimum.html attempt to tweak language a bit * Update focus-appearance-minimum.html slight wording tweak * change of sub-component language back to 'may be' * replaced 'may' with 'can' * Update focus-appearance-minimum.html Added word 'note' * moving the final bullet back in outside the exceptions * updates to understanding document Attempts to address several questions in issues * Adding notes to the SC file Co-authored-by: Alastair Campbell <ac@alastc.com>
* Modify adjacent color wording in sub-bullet * changed article for minimum bounding box changed from "a minimum" to "the minimum" to ensure it works with the 'disparate parts' note. * Update focus-appearance-minimum.html updated some guidance for selection * Update focus-appearance-minimum.html (#2345) * Update focus-appearance-minimum.html An attempt to address the concerns expressed for the later comments in #2237. The closing paragraph has become a final exception bullet. A note has been added providing an example as well as information on selection versus focused. * Update focus-appearance-minimum.html fixed a missing word and tweaked at same time * Update focus-appearance-minimum.html Added the changes to the SC as well as the Understanding document * Update focus-appearance-minimum.html attempt to tweak language a bit * Update focus-appearance-minimum.html slight wording tweak * change of sub-component language back to 'may be' * replaced 'may' with 'can' * Update focus-appearance-minimum.html Added word 'note' * moving the final bullet back in outside the exceptions * updates to understanding document Attempts to address several questions in issues * Adding notes to the SC file Co-authored-by: Alastair Campbell <ac@alastc.com> Co-authored-by: Mike Gower <gowerm@ca.ibm.com>
@WilcoFiers I believe the changes to the normative text have addressed your question. If you concur, please close. If not, please update the ticket. |
The updates, particularly this addition to the normative text address this issue:
|
When you expand a combobox or select, users can choose an option using arrow keys. In ARIA this is called the active descendant. So in addition to having a focused combobox, there is an active option. Question is, does 2.4.11 apply to active descendants in addition to the focused control? If so, does the focused control need to have the focus indicator while there is an active descendant?
More generally, I think an intuitive understanding of what is focused can occasionally contradict the programmatically determined focus state. It seems ambiguous to me which one of those to use when the two contradicts, such as in the case of active descendants.
https://www.w3.org/TR/wai-aria-practices-1.1/examples/combobox/aria1.1pattern/listbox-combo.html
The text was updated successfully, but these errors were encountered: