Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update paragraph in option to remove DOM focus requirement #1682

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

Closed
wants to merge 3 commits into from

Conversation

carmacleod
Copy link
Contributor

@carmacleod carmacleod commented Jan 21, 2022

Fixes #1661


Preview | Diff

@pkra pkra added this to the ARIA 1.3 milestone Jan 22, 2022
@JAWS-test
Copy link
Contributor

@carmacleod If I understand correctly, you have removed the variant that the list entry (role=option) has DOM focus. I think that is wrong. Our discussion was about what happens if the option does not have DOM focus. But with DOM focus, the option should also be considered selected (aria-selected=true), regardless of the tabindex. In practice, DOM focus and tabindex will usually coincide, but this does not necessarily have to be the case. My suggestion would be to reinsert "has DOM focus or".

@carmacleod carmacleod marked this pull request as ready for review January 27, 2022 18:12
@scottaohara scottaohara self-requested a review January 27, 2022 18:18
@alia11y alia11y requested review from alia11y and removed request for scottaohara January 27, 2022 18:18
@scottaohara scottaohara self-requested a review January 27, 2022 18:18
@smhigley smhigley self-requested a review January 27, 2022 18:18
@jnurthen jnurthen requested a review from spectranaut February 17, 2022 18:27
Copy link
Contributor

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think more work is need to avoid hidden or inert elements that still match this criteria... It may be as simple as adding, "…and are not hidden or inert…" but I'm not in a position to consider prose suggestions deeply at the moment.

Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Darn I have to say I'm not a huge fan of leaving "has dom focus" in this list, @JAWS-test -- what scenario satisfies "has dom focus" while not satisfying something else from the list? Happy to be convinced otherwise but it seems unnecessary to add.

Otherwise I'm good with the change just waiting to leave a +1 until I understand :)

@JAWS-test
Copy link
Contributor

@spectranaut

Two reasons for leaving "has dom focus":

  1. this was in it so far, removing this now would make it no longer compatible with old versions.
  2. if a list entry has dom focus, the other conditions don't necessarily have to be met (e.g. focus can be set via JS without tabindex=0 at the list entry). The new conditions were only added so that the selected item can be determined even if the item does not have the focus.

But I don't mind if dom focus is removed either. In the end it's just about providing a repair mechanism when no aria-selected is used

@smhigley
Copy link
Contributor

I think more work is need to avoid hidden or inert elements that still match this criteria... It may be as simple as adding, "…and are not hidden or inert…" but I'm not in a position to consider prose suggestions deeply at the moment.

@cookiecrook question b/c I have no idea how this is implemented in browsers -- how important is it to specify that hidden/inert options are not implicitly selected if they aren't exposed anyway? Just from an authoring standpoint, I don't think I would care about that detail unless future AOM stuff makes it possible to somehow query the implicit selection of an ARIA listbox.

I do agree with @JAWS-test that disabled options should not get implicit selection no matter what.

@scottaohara
Copy link
Member

what happens if all options are set to tabindex 0+? everything is selected? that seems wrong.... but also, trying to guess at which is the correct selection is more wrong.

@smhigley
Copy link
Contributor

Closing this PR, since #1719 was merged

@smhigley smhigley closed this Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistency between native and ARIA listboxes when implicit aria-selected is provided
7 participants