csstools / sanitize.css

A best-practices CSS foundation
https://csstools.github.io/sanitize.css
Creative Commons Zero v1.0 Universal
5.21k stars 314 forks source link

Should set `cursor: pointer` on the `[aria-controls]` elements? #218

Closed yuheiy closed 3 years ago

yuheiy commented 3 years ago

The [aria-controls] elements do not necessarily have to be button-like. For example, a text field may control another element, such as a combo box.

https://www.w3.org/TR/wai-aria-practices-1.2/#combobox

And since many buttons do not have the aria-controls attribute, it seems unnatural that only the [aria-controls] element has cursor: pointer set.

abhishekrawat22 commented 3 years ago

@yuheiy If any element is controlling some other element that means there is an event to occur, whether it is to display a modal or a read more part. So cursor: pointer is needed because that element is linked to something. That's the default for any clickable thing.

jonathantneal commented 3 years ago

I agree. This should not be in the project. Fortunately for me, aria-controls doesn’t actually work in any reliable way and is presently disappearing.

jonathantneal commented 3 years ago

This has been removed in https://github.com/csstools/sanitize.css/commit/678ccd2fe3c92b47dc81537502825dce15702ed6

Thanks, @yuheiy!