[go: nahoru, domu]

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

Add functionality to call out deprecated attributes #53

Closed
scottaohara opened this issue Jan 9, 2022 · 5 comments
Closed

Add functionality to call out deprecated attributes #53

scottaohara opened this issue Jan 9, 2022 · 5 comments

Comments

@scottaohara
Copy link
Contributor

aria-grabbed and aria-dropeffect are deprecated attributes for all elements/roles.

ARIA 1.2 also deprecates aria-disabled, aria-errormessage, aria-haspopup, and aria-invalid from being global attributes. They are instead allowed on specific roles where their usage still makes sense.

aria-disabled, aria-errormessage, aria-haspopup, and aria-invalid supported on
application, columnheader, combobox, gridcell, rowheader, searchbox, slider, spinbutton, textbox

aria-disabled, aria-haspopup supported on
button, link, menuitem, menuitemcheckbox, menuitemradio, tab, treeitem

aria-disabled, aria-errormessage, and aria-invalid supported on
checkbox, listbox, radiogroup, switch, tree, treegrid

aria-disabled supported on
grid, group, menu, menubar, option, radio, row, scrollbar, separator (if focusable), tablist, toolbar

@gezlemon
Copy link
Contributor

Hi @scottaohara, thank you for this list. I've added it to my list for the next update.

@scottaohara
Copy link
Contributor Author

@gezlemon another thing which i almost forgot to mention, specific to aria-invalid.

See w3c/html-aria#366, but the quick version is that aria-invalid=true | false are valid on all the roles i mentioned in my op. While deprecated, aria-invalid=spelling | grammar | false, are still allowed on all other elements until a new attribute is created to expose these states.

@gezlemon
Copy link
Contributor

Hi @scottaohara I've updated the script to deprecate the attributes you've listed, and included an exception for aria-invalid when "spelling", "grammar", and "false" are used.

@scottaohara
Copy link
Contributor Author

Thanks @gezlemon. Though it seems that not all cases are covered?

for example, the test case i had (https://w3c.github.io/html-aria/tests/deprecated-attrs.html) used aria-grabbed and aria-dropeffect on divs. but the deprecation notice isn't called out. When i added a role=group to the divs, then the message showed up.

@gezlemon
Copy link
Contributor

Thanks, @scottaohara I've updated the script to check for deprecated attributes for elements without an ARIA role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants