Skip to content

Clarify details documentation for a11y and usage #9899

Closed

Description

@scottaohara

What is the issue with the HTML Standard?

With the merging of #9400 the topics raised about how to identify / expose the grouping of details elements for acessibility wasn't really resolved. The note "keeping related elements together can be important for accessibility" dosen't do much in the description of why, or how. For example, the prior sentence indicating one could use the section element won't actually do anything to help expose this grouping to ATs, without additional guidnace.

Additionally, it may also be worth pulling in guidance similar to the following note about dialogs:

As with all HTML elements, it is not conforming to use the dialog element when attempting to represent another type of control. For example, context menus, tooltips, and popup listboxes are not dialog boxes, so abusing the dialog element to implement these patterns is incorrect.

For instance, the hidden until found behavior of details/summary can be quite useful if looking for specific content within a web page. But, say if someone were to use these elements to create custom UI components, similar to those listed in the dialog note, or even simply as a means to create an accordion of links within a navigation, such details content could be unexpectedly revealed as a user searched for a term or phrase in the primary content of the page.

I can work on a PR to address the topics I raised.

Activity

  1. added
    accessibility
    a11y-tracker
    on Nov 1, 2023
  2. dbaron commented on Dec 12, 2023

    @dbaron
    Member

    I made #9989 to try to address at least part of this; I'd appreciate review.

    No, I'm not going to have any trouble distinguishing between the numbers of issue #9899 and related PR #9989...

  3. aardrian commented on Dec 19, 2023

    @aardrian

    Linking #10003 because sometimes I wander back to issues and having related issues and PRs all connected helps me.

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

    a11y-trackeraccessibility

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions