Skip to content

Update picture element to allow aria-hidden #41

Closed

Description

@scottaohara

While we do not think it's a good idea to allow additional roles / aria-* attributes on the picture element, since it is not supposed to be directly exposed to the a11y-api, there are potential use cases for setting the entire picture, and thus the graphics it represents as hidden. While this should be done with alt="" on the fallback image element, allowing aria-hidden=true on the picture itself should be allowed as this will also allow authors to hide the element.

Action item:
The aria-hidden attribute can be specified on the picture element as the only allowed aria attribute.

Activity

  1. gezlemon commented on Sep 21, 2021

    @gezlemon
    Collaborator

    Thanks, Scott. I've updated the script to allow the aria-hidden attribute on the picture element.

  2. scottaohara commented on Sep 21, 2021

    @scottaohara
    ContributorAuthor

    still getting the invalid attribute flag when i test

    <picture aria-hidden="true"><img src="#" alt="foo"></picture>
  3. gezlemon commented on Sep 21, 2021

    @gezlemon
    Collaborator

    Apologies, I updated the script in GitHub but forgot to upload it for the bookmarklet. Should be okay now.

  4. scottaohara commented on Sep 23, 2021

    @scottaohara
    ContributorAuthor

    confirmed that the update has been implemented. thank you again @gezlemon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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