Skip to content

False value cause aria boolean attributes to be removed from the DOM #11053

Closed
@falcon03

Description

@falcon03

Version

2.6.11

Reproduction link

https://www.dropbox.com/s/3ltqeent65djedw/problematic-false-aria-values.zip?dl=0

Steps to reproduce

  1. Extract the provided zip archive and enter the produced "problematic-false-aria-values" directory.
  2. Install dependencies (i.e. yarn install).
  3. Run the development server (i.e. yarn serve) and head to its url with your favorite browser.
  4. Inspect the DOM of the page: the aria-checked and aria-expanded attributes won't be there.
  5. Enable the checkbox and/or expand the toggle.
  6. Inspect the DOM of the page: this time both aria-checked and aria-expanded will be there as expected.
  7. Disable the checkbox and collapse the toggle.
  8. Inspect the DOM of the page: the aria-checked and aria-expanded attributes won't be there, again.

What is expected?

Aria attributes should be present in the DOM even if their value is false.

What is actually happening?

Aria attributes are not present in the DOM when their value is false.


Unlike for html 5 boolean values, removing aria attributes from the DOM when their value is false changes the page semantics and degrades its accessibility, causing markup validation issues as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions