这是indexloc提供的服务,不要输入任何密码
Skip to content

role="separator" not allowed on button via aria-allowed-role #4142

@gerardkcohen

Description

@gerardkcohen

Product

axe-core

Product Version

4.7.2

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Expectation

In order to achieve a simple, focusable separator I should be able to add role="separator" and aria-valuenow to a button.

Actual

Adding role="separator" to a button in order to achieve a focusable separator fails axe-core tests for aria-allowed-role as a best practice.

To solve this problem, you need to fix the following:
ARIA role separator is not allowed for given element

ARIA role should be appropriate for the element

How to Reproduce

<button role="separator" aria-valuenow="50" aria-label="Handle">></button>

Sample code: Simple focusable separator

Additional context

Is there anything that is preventing me from overwriting the button semantics with role="separator" in order gain native focusability and event handling?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions