user1970033
user1970033

Reputation: 31

Creating custom WAI-ARIA role

I am new to WAI-ARIA. I want to know how can we create a custom role based on the existing roles.

For example, i want to create a custom button role from aria button role. It will be great, if any one provide steps to do so.

Upvotes: 3

Views: 1463

Answers (1)

BrendanMcK
BrendanMcK

Reputation: 14498

Custom roles are not supported in WAI-ARIA 1.0, although there is infrastructure within ARIA that could support this in future. From https://www.w3.org/TR/wai-aria-1.0/roles:

5. The Roles Model

[...]

The RDF/OWL taxonomy may be used as a vehicle to extend WAI-ARIA in the future or by tool manufacturers to validate states and properties applicable to roles per this specification.

For now, stick to the closest defined role; likely button in your case.

In your case, what is it about your button that requires a custom role? How does it differ in behavior from a regular button?

Upvotes: 4

Related Questions