Skip to content

Core: removed aria-required attribute #2012

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

Conversation

alexbokii
Copy link
Contributor

According to the latest documentation, 'aria-required' is a widget attribute and should be used only with particular roles. We don’t need to use it with native elements and when ‘required’ attribute exist. At the moment all instances of 'aria-required' attribute cause an error "This element has an unsupported ARIA attribute" in Google Chrome accessibility validator.
https://www.w3.org/TR/wai-aria/states_and_properties#aria-required

This addresses #1841.

@Arkni Arkni self-assigned this Jun 5, 2017
@Arkni
Copy link
Member

Arkni commented Jun 10, 2017

@alexbokii
Does the same apply to contenteditable elements like divs ?
What should happen in that case ?

@alexbokii
Copy link
Contributor Author

@Arkni No, it's different when we use divs - we need to apply aria-required attribute if the div tag is used instead of the input tag and user input is required. But the div should have a role attribute that points to the nature of control - it can be a "textbox", "combobox", etc.
So, according to this doc - https://www.w3.org/TR/wai-aria/states_and_properties#attrs_widgets, if we want to use aria-required with divs we must also add a role:
<div contenteditable="true" role="textbox" aria-required="true">.

@staabm
Copy link
Member

staabm commented Jun 11, 2017

IIRC we support only real input types. When people use custom markup instead of native input elements they should apply the aria roles for them.

IMHO we should stop adding aria attributes.

👍

Copy link
Member

@Arkni Arkni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the fact that this PR is a bug fix, there is nothing to fear from a semver perspective.
I'm going to merge this for now, and if someone complain about contenteditable, we will then consider adding an aria-required attribute to it only in case the role textbox is present.

@Arkni Arkni merged commit 54073af into jquery-validation:master Jun 12, 2017
@Arkni
Copy link
Member

Arkni commented Jun 12, 2017

@alexbokii
Thanks a lot for your contribution :)

@Arkni Arkni removed their assignment Jun 12, 2017
@alexbokii
Copy link
Contributor Author

@Arkni happy to help :)

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

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy