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

Clarify whether aria-activedescendant may have a null value #1970

Open
brennanyoung opened this issue Jul 4, 2023 · 6 comments
Open

Clarify whether aria-activedescendant may have a null value #1970

brennanyoung opened this issue Jul 4, 2023 · 6 comments
Assignees
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Milestone

Comments

@brennanyoung
Copy link
Contributor

brennanyoung commented Jul 4, 2023

The spec for aria-activedescendant offers no guidance for what happens when there is no descendant (or owned) element to focus.

This may happen (e.g.) with a combobox under at least two distinct conditions:

  • User has not yet entered anything in the input field
  • User has entered a string which is not matched

Spec at https://www.w3.org/TR/wai-aria-1.2 does not recommend removing the attribute if it points at "nothing" (as it does with aria-errormessage) - this might imply that keeping it in the DOM (e,g, pointing at an empty string) is completely fine, but as it does not explicitly state that it is permitted, the ideal approach is not very obvious. I'd like this clarified unambiguously.

Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?
Apparently yes.

@spectranaut
Copy link
Contributor

@mpaiva maybe this can be worked on with aria-controls?

@mpaiva
Copy link

mpaiva commented Jul 13, 2023

I agree @spectranaut - we should add that to the language.

@mpaiva mpaiva pinned this issue Jul 13, 2023
@pkra pkra added the clarification clarifying or correcting language that is either confusing, misleading or under-specified label Jul 14, 2023
@pkra pkra unpinned this issue Jul 18, 2023
@MarioBatusic
Copy link
Contributor

Agree. An other example is an empty listbox. We use for example listboxes for object lists and these can be empty. After creating one object list, it is always empty. So you have to put the focus on it and at these circumstances the focus stys exaclty here. The aria-activedescendant can only be "none" at this time.

@mpaiva
Copy link

mpaiva commented Jul 19, 2023

I am not sure if anyone has already proposed a way to keep the parent element informed of its descendent existence, but I am thinking that a new attribute could be of help for these dynamic elements. I'd be willing to write a proposal for aria-pending.

aria-pending: This attribute could be used to indicate that a descendant element is pending or in the process of being mounted or created. It would inform parent elements, such as aria-controls or aria-owns, and assistive technologies that the descendant is not currently available but is expected to be added or become accessible in the future.

The aria-pending attribute could have Boolean values such as “true” or “false” to indicate the pending state of the descendant. When the descendant is finally mounted or available, the attribute could be updated to reflect the change.

@spectranaut - would you think this is viable?

@MarioBatusic
Copy link
Contributor

I think that aria-busy put on the parent element has already the same functionality?

@mpaiva
Copy link

mpaiva commented Jul 19, 2023

I think that aria-busy put on the parent element has already the same functionality?

Indeed. Thanks @MarioBatusic – this is helpful and I can add this approach in the proposed language changes for the aria-controls attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Projects
None yet
Development

No branches or pull requests

5 participants