Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider allowing roles on <area> with no href attribute #325

Closed
scottaohara opened this issue May 29, 2021 · 3 comments
Closed

Consider allowing roles on <area> with no href attribute #325

scottaohara opened this issue May 29, 2021 · 3 comments
Assignees
Labels
Allowed roles Pertaining to the allowed roles of HTML elements

Comments

@scottaohara
Copy link
Member

scottaohara commented May 29, 2021

Creating this issue to replace #317, as there is no need to resolve that issue for 1.0 specification, but we should consider this suggestion going forward.

<a> with no href takes any role, but <area> with no href takes no roles. These are similar and seem like they should be consistent. <area role=button> seems like it would be useful, as would checkbox and other widget roles.

@scottaohara scottaohara added the Allowed roles Pertaining to the allowed roles of HTML elements label May 29, 2021
@scottaohara scottaohara added this to the ARIA in HTML: Next milestone Sep 24, 2021
@scottaohara
Copy link
Member Author

Spent quite a bit of time reviewing this today. Due to the area element's inability to be styled effectively, that it cannot contain any child elements (save for css pseudo-element content - but even that doesn't render near the actual area, but rather adjacent to the image map)... i really don't see how this would be a good change. though the concept of a and area without href are similar, the actual rendered result is quite different.

That said I can see a potential use case of allowing role=button or role=link (ideally with tabindex=0, but there can also be legitimate use cases for needing to expose these roles but not wanting them in the tab order - per other elements that perform the same functionality).

cc @stevefaulkner and @patrickhlauke, what say you two on this?

@scottaohara scottaohara self-assigned this Oct 5, 2021
@patrickhlauke
Copy link
Member

patrickhlauke commented Oct 5, 2021

discussed at meeting today with @scottaohara and @stevefaulkner - agreed to allow role="button" and role="link" (with tabindex="0") but not other roles due to weird browser behaviour/treatment of <area>

@scottaohara
Copy link
Member Author

specifically due to the fact that no styling is allowed for these elements, or allow for nested content in away that would make sense for any other role here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Allowed roles Pertaining to the allowed roles of HTML elements
Projects
None yet
Development

No branches or pull requests

2 participants