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

ARIA 1.1 for role="treeitem" indicates aria-selected is required even in single-select trees. #667

Open
katiehockman opened this issue Apr 25, 2018 · 2 comments
Labels
Feedback Issue raised by or for collecting input from people outside APG task force Out of APG Scope Outside scope of APG, e.g., external dependency

Comments

@katiehockman
Copy link

katiehockman commented Apr 25, 2018

https://www.w3.org/TR/wai-aria-1.1/#treeitem
aria-selected is listed as required for elements with role="treeitem".

For the case of trees that support multiple selection, this is true. However, quoting the APG for single select, "If the tree does not support multiple selection, aria-selected is set to true for the selected node and it is not present on any other node in the tree." That quote indicates that the aria-selected property is only required (allowed, even) for the selected node in the case of single select trees.

This should be updated in the ARIA 1.1 spec, or else corrected/clarified in the APG.

Related bug that the APG examples don't use aria-selected at all: #666

@mcking65
Copy link
Contributor

@katiehockman, It would be an ARIA spec bug if aria-selected were required on treeitem.

So, I was just about to raise an ARIA issue and submit a PR to make aria-selected not be required ... but I do not see that it is. There are no required states or properties listed for treeitem in either the 1.1 spec or the 1.2 editor's draft.

I am closing as not a practices issue.

@mcking65 mcking65 added Out of APG Scope Outside scope of APG, e.g., external dependency Feedback Issue raised by or for collecting input from people outside APG task force labels Jun 24, 2018
@carmacleod
Copy link
Contributor

@mcking65 You said:

It would be an ARIA spec bug if aria-selected were required on treeitem. So, I was just about to raise an ARIA issue and submit a PR to make aria-selected not be required ... but I do not see that it is.

Note that:

  • treeitem inherits from both listitem and option.
  • option requires aria-selected.
  • so technically, aria-selected is required on treeitem.
  • the current version of the spec has scripting to add the string "(required)" on inherited attributes that are required, so the list of inherited attributes for treeitem now says:

    aria-selected (state) (required)

I can open a spec issue, but I suspect it's more nuanced than simply saying it's not required. Often, selecting a treeitem opens a view of the "logical contents" of the selected treeitem in an editor, chart, table, page or whatever to the right of the tree. In those cases, the treeitem that was selected for the action should have aria-selected="true". So maybe we can say that if the tree is behaving more like a static list then aria-selected is not required, but if the tree is behaving like a selectable listbox then aria-selected is required?

@carmacleod carmacleod reopened this May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Issue raised by or for collecting input from people outside APG task force Out of APG Scope Outside scope of APG, e.g., external dependency
Projects
None yet
Development

No branches or pull requests

3 participants