Skip to content

Aria Role should be configurable #214

@tkalmar

Description

@tkalmar

The attributes set here are redundant.

Elements with the role status have an implicit aria-live value of polite and an implicit aria-atomic value of true.

It would be nice if one could change the role. For example for alerts it would be more suitable to set the role to alert
This would allow users of screen readers to get immediately get notified about the message.

my current workaround is:

const parent = error.el.parentElement;
parent?.setAttribute('role', 'alert');
parent?.setAttribute('aria-live', 'assertive');
parent?.setAttribute('aria-atomic', 'true');

The aria-live and aria-atomic are here also redundant but needed because of the initial set attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions