Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Slider does not generate a useful ARIA label #366

Closed
@marcysutton

Description

@marcysutton

When using $materialAria.expect() to handle labeling of the material-slider component, unless developers provide a custom aria-label attribute themselves (and few will), no useful label is generated nor is a warning logged to alert the developer. For example: because material-slider injects a model value like 70 as text, $materialAria.expect() copies that text into an aria-label, but that is not a useful label for a slider.

See aria-label="70" and the highlighted span (child node):
Material slider rendered source

Expected behavior:

  • Developer omits aria-label, so a warning is logged telling them to do so.
  • Developer includes aria-label and the purpose of the component is clearly communicated to AT users. Useful labels would be "Volume" or "Rating 2/5"

Related PR: #344

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11yThis issue is related to accessibilitytype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions