Skip to content
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

Early design review: Focusgroup #732

Closed
1 task done
benbeaudry opened this issue Apr 26, 2022 · 7 comments
Closed
1 task done

Early design review: Focusgroup #732

benbeaudry opened this issue Apr 26, 2022 · 7 comments
Assignees
Labels
a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. Resolution: satisfied The TAG is satisfied with this design Review type: CG early review An early review of general direction from a Community Group Venue: Open UI

Comments

@benbeaudry
Copy link

benbeaudry commented Apr 26, 2022

Braw mornin' TAG!

I'm requesting a TAG review of Focusgroup.

We propose exposing a new web platform primitive—'focusgroup'—to facilitate focus navigation (not selection) using arrow keys among a set of focusable elements. This feature can then be used (without any JavaScript) to easily supply platform-provided focusgroup navigation into custom-authored controls in a standardized and predictable way for users.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • The group where the incubation/design work on this is being done (or is intended to be done in the future): Open UI
  • The group where standardization of this work is intended to be done ("unknown" if not known): Unknown
  • Existing major pieces of multi-stakeholder review or discussion of this design: There are some issues filed on Open UI's github repo.
  • Major unresolved issues with or opposition to this design: None (or should I say: none that I know of)
  • This work is being funded by: Microsoft Edge

You should also know that...

The implementation of the declarative markup part of this feature is mostly completed in Chromium. We still need to discuss further the CSS-part of the proposal before starting to implement it. We feel confident enough about our implementation of the declarative markup part of this feature to start Origin Trials as soon as soon as possible in order to get feedback from the web community and improve it before drafting the specifications.

We'd prefer the TAG provide feedback as:

💬 leave review feedback as a comment in this issue and @-notify @benbeaudry and @travisleithead.

@benbeaudry benbeaudry added Progress: untriaged Review type: CG early review An early review of general direction from a Community Group labels Apr 26, 2022
@LeaVerou LeaVerou self-assigned this Apr 26, 2022
@torgo
Copy link
Member

torgo commented Apr 27, 2022

Hi @benbeaudry - you've listed "Unknown" for the trajectory for this work. Can we assume it would be going to HTML (WHATWG) and CSS wg at some point? cc @travisleithead

@torgo torgo added this to the 2022-05-09-week milestone Apr 27, 2022
@benbeaudry
Copy link
Author

Yes, this is what I assume as well. @travisleithead, can you confirm?

@torgo torgo added the a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. label May 9, 2022
@torgo torgo modified the milestones: 2022-05-09-week, 2022-05-23-week May 9, 2022
@AutoSponge
Copy link

AutoSponge commented Jun 19, 2022

For https://www.w3.org/WAI/APA/track/actions/2326:

My initial review is very positive. However, the explainer and demo (via polyfill) fail WCAG success criteria when it comes to "nested" focusgroups (via extend). Example 11 demonstrates this in the docs and is very similar to the "vertical menu (with horizontal submenus)" example.

In Example 11, the container-element has tabindex=-1 with no role. In WAI Authoring Practices menu and tree examples, the element "owning" a subgroup is an item, not a separate container with no role.

The problem is evident in the demo when using keyboard navigation. Users must use ArrowDown until reaching a generic element with no accessible name then somehow intuiting that the ArrowRight key to reach the first sub-menu item. In the WAI examples, the direction change begins on a menuitem or treeitem with aria-expanded. Removing the tabindex from the container-element makes the "sub-menu" items unreachable by keyboard. Alternatively, adding role=menuitem to the container and an accessible name (via aria-label or aria-labelledby) seems to fix the issue.

While the use of focusgroup works well in flat structures, its use in nested structures will need better examples that don't lead to focusable elements with no name or role.

@LeaVerou
Copy link
Member

LeaVerou commented Jun 20, 2022

@benbeaudry Do you plan to add this to ElementInternals as well? I imagine it would be very useful for many types of web components to have as a default.

We were also wondering what are your thoughts on the point @AutoSponge raised

@chrisdholt
Copy link

@travisleithead i don’t think we discussed the above, but a huge +1 to @LeaVerou’s comment above on adding to ElementInternals.

@travisleithead
Copy link
Contributor

@AutoSponge thanks so much for pointing this out.

While the use of focusgroup works well in flat structures, its use in nested structures will need better examples that don't lead to focusable elements with no name or role.

I've done a full pass over the explainer to ensure that all the examples are not only properly structured for accessibility (addressing the example you pointed out), but also added appropriate roles/states on custom element names to help reinforce proper first-class accessibility design. (I'm a little ashamed that I missed this previously because so much of the value of focusgroup is for better keyboard-accessibility-by-default.)

Please take a look at the PR in case there are still problems--I'm still learning to write good accessible examples :)

@LeaVerou
Copy link
Member

We took another look today and we generally happy with this feature. We will re-iterate that this should be a part of ElementInternals, but we will go ahead and close this review for now. Feel free to reopen if any future issues arise.
Please engage with the accessibility community to ensure that @AutoSponge’s concerns are addressed and that this feature works well with AT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. Resolution: satisfied The TAG is satisfied with this design Review type: CG early review An early review of general direction from a Community Group Venue: Open UI
Projects
None yet
Development

No branches or pull requests

7 participants