Skip to content

[confirm-dialog] Minor accessibility enhancements #467

Open
@anezthes

Description

@anezthes

Heading

Accessibility guidelines recommend using headings in order: <h1>, <h2>, <h3>, etc. Each page should have an <h1>, describing the main purpose of the page (similarly to a page title), and it's recommended to only use one per page.

Confirm Dialog uses <h3> for its title, implying the dialog is a subsection of <h2> from a content hierarchy/document outline point-of-view. If we need a default/hard-coded heading, I'd argue <h2> is the safer/expected option.

aria-labelledby & aria-describedby

When a title is present, is should be given an id and used as a label for the dialog (via aria-labelledby). Similarly, Confirm Dialogs featuring support text would benefit from setting the aria-describedby attribute to the id of the element used for displaying the text.

Related: https://github.com/vaadin/vaadin-dialog/issues/227

Header & footer

We could/should also consider using <header> and <footer> tags to improve accessibility and to give the structure some more semantic meaning.

Examples:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions