Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

new a11y rule: Required input elements must define aria-required="true" #280

Closed
HamletDRC opened this issue Sep 27, 2016 · 7 comments
Closed
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Domain: Accessibility Rules around accessibility verification, commonly react-a11y-*. Status: Accepting PRs Type: Rule Suggestion Adding a new rule that doesn't yet exist here or in TSLint core.
Milestone

Comments

@HamletDRC
Copy link
Member

Required input elements must define aria-required="true"

http://www.clarissapeterson.com/2012/11/html5-accessibility/

@JoshuaKGoldberg JoshuaKGoldberg added Status: Accepting PRs Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Domain: Accessibility Rules around accessibility verification, commonly react-a11y-*. Type: Rule Suggestion Adding a new rule that doesn't yet exist here or in TSLint core. labels Jul 6, 2018
@cTxplorer
Copy link

cTxplorer commented Oct 6, 2018

@JoshuaKGoldberg Can you help with the issue - how can I contribute here?

@JoshuaKGoldberg
Copy link

👋 Hey @cTxplorer, glad to have you help!

I believe the issue is suggesting adding a new rule that logs a complaint for any <input> tag whose required value exists but isn't "true", though @HamletDRC would know better if that's wrong or misleading.

These would be fine for this rule:

<input />
<input required="true" />

...but these should cause complaints:

<input required="" />
<input required="false" />

I'd recommend copy&pasting then modifying a similar existing rule such as react-a11y-titles and doing a find-all on its title to see where it's used. It'll also have a test file similar to ReactA11yTitlesRuleTests.ts that should validate where the rule should or shouldn't complain.
Here's a good writeup you can go off for a few more links, courtesy of IllusionMH!

Is that enough information to go off of?

@cTxplorer
Copy link

@JoshuaKGoldberg Great help. Thanks!

@jcnevess
Copy link
Contributor

Hi, @cTxplorer , are you still working on this issue?

@jcnevess
Copy link
Contributor

@JoshuaKGoldberg can I submit a pr for this issue?

@JoshuaKGoldberg
Copy link

@jcnsilva sure, go ahead. > a couple of weeks seems like a good amount of time to wait.

jcnevess pushed a commit to jcnevess/tslint-microsoft-contrib that referenced this issue Oct 27, 2018
JoshuaKGoldberg pushed a commit that referenced this issue Oct 28, 2018
@cTxplorer
Copy link

@jcnsilva No I'm not working on this issue. Sorry, for late response!
Great work, btw.

@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0 milestone Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Domain: Accessibility Rules around accessibility verification, commonly react-a11y-*. Status: Accepting PRs Type: Rule Suggestion Adding a new rule that doesn't yet exist here or in TSLint core.
Projects
None yet
Development

No branches or pull requests

4 participants