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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update picker item and picker list roles #6884

Closed
KingOfTac opened this issue Jan 3, 2024 · 10 comments 路 May be fixed by #6885
Closed

fix: update picker item and picker list roles #6884

KingOfTac opened this issue Jan 3, 2024 · 10 comments 路 May be fixed by #6885
Labels
area:fast-foundation Pertains to fast-foundation closed:obsolete No longer valid community:good-first-issue Good issues for first time contributors community:help-wanted Valuable contributions not currently worked on by the core team compliance:a11y Accessibility compliance.

Comments

@KingOfTac
Copy link
Collaborator

馃悰 Bug Report

With Picker presenting a list of selectable items selected using aria-selected, the roles for the picker list and the options should be listbox and option rather than list and listitem respectively.

馃捇 Repro or Code Sample

馃 Expected Behavior

The roles for the list and items should use appropriate roles for using aria-selected

馃槸 Current Behavior

The current roles used are list and listitem which tend to be more appropriate for static lists.

馃拋 Possible Solution

The roles that should be used are listbox and option.

馃敠 Context

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected

馃實 Your Environment

  • OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]
  • Browser [e.g. Microsoft Edge, Google Chrome, Apple Safari, Mozilla FireFox]
  • Version [e.g. 1.8.0]
@KingOfTac KingOfTac added community:help-wanted Valuable contributions not currently worked on by the core team community:good-first-issue Good issues for first time contributors area:fast-foundation Pertains to fast-foundation compliance:a11y Accessibility compliance. labels Jan 3, 2024
@KingOfTac KingOfTac added this to the FAST Foundation 3.0 milestone Jan 3, 2024
@scomea
Copy link
Collaborator

scomea commented Jan 3, 2024

This would be just the flyout list and not the "selected items" list?

@KingOfTac
Copy link
Collaborator Author

This would be just the flyout list and not the "selected items" list?

I believe any lists and items that are using aria-selected should have their roles updated to listbox and option. Pinging @chrisdholt and @radium-v to maybe clarify but based on what I have read on the different roles on MDN and ARIA-APG, this is the approach we should use.

@scomea
Copy link
Collaborator

scomea commented Jan 3, 2024

I believe any lists and items that are using aria-selected should have their roles updated to listbox and option.

The selected items list does not currently use "aria-selected" if that's the criteria.

@chrisdholt
Copy link
Member

This would be just the flyout list and not the "selected items" list?

I believe any lists and items that are using aria-selected should have their roles updated to listbox and option. Pinging @chrisdholt and @radium-v to maybe clarify but based on what I have read on the different roles on MDN and ARIA-APG, this is the approach we should use.

What is the accessible role for the element itself?

@KingOfTac
Copy link
Collaborator Author

What is the accessible role for the element itself?

The Picker itself doesn't have a role explicitly mapped to it.

@scomea
Copy link
Collaborator

scomea commented Jan 4, 2024

The Picker itself doesn't have a role explicitly mapped to it.
Picker wraps a list (can be described by setting aria attributes on the top-level component) which contains selected list items, and is followed in the tab order by a combobox that has the flyout with options. The combobox is currently a child of the 'list' which probably isn't ideal.

JiginJayaprakash added a commit to JiginJayaprakash/fast that referenced this issue Jan 4, 2024
@scomea
Copy link
Collaborator

scomea commented Jan 5, 2024

I don't think option/listbox works for the base list of already selected items because those items aren't technically "a list from which a user may select one or more static items". I looked at outlook to see what they do with mail recipients in an e-mail which is essentially the kind of interaction picker is designed for and they use a "textbox" role wrapping "buttons" for the individual recipients. That seems odd to me but if it works better than a list with list-items that could be the solution.

image

I note that list-item supports "aria-shortcuts" which implies they can be interacted with as is the case in picker's list where the focused item can be deleted.

@scomea
Copy link
Collaborator

scomea commented Jan 5, 2024

Note - we could quickly merge a fix which addresses the roles in the flyout menu, which clearly should be "listbox/option" and continue discussing how to handle roles in the selected items list.

@scomea
Copy link
Collaborator

scomea commented Jan 5, 2024

I'm wondering if those roles shouldn't be configurable by authors. Maybe in some scenarios picker is being used to edit something that is contextually a "textbox" and in other cases a "list"?

@janechu janechu removed this from the FAST Foundation 3.0 milestone May 28, 2024
@janechu
Copy link
Collaborator

janechu commented May 29, 2024

Unfortunately @microsoft/fast-foundation is being deprecated, refer to #6955. I see this was mentioned in a PR, we will be addressing open PRs and merging what we can before we snap an archive branch to preserve the latest state of Foundation, however to bring us up to date I am closing out issues.

@janechu janechu closed this as completed May 29, 2024
@janechu janechu added the closed:obsolete No longer valid label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fast-foundation Pertains to fast-foundation closed:obsolete No longer valid community:good-first-issue Good issues for first time contributors community:help-wanted Valuable contributions not currently worked on by the core team compliance:a11y Accessibility compliance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants