Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] Use for=ID on radio/checkbox label.#24434
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| {%endblockchoice_label %} | ||
| {%blockcheckbox_label -%} | ||
| {%-setlabel_attr=label_attr|merge({for:id}) -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Missing quotes{'for': id}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
really? I never quote the keys in Twig (unless strictly required because of white spaces, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Quoting is no requirement in Twig. I thought Sebastian suggested it because it is a part of the code standard.
sstok left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good idea, but Twig key name needs to be quoted.
Also this is can be considered a bug fix 🤔
Nyholm commentedOct 5, 2017
Thank you for the review. Yeah you might be correct. This could be considered a bugfix. |
xabbuh commentedOct 5, 2017
To me that's a bugfix. |
fabpot commentedOct 5, 2017
@Nyholm Can you change the base branch to 2.7 (I think that should be considered as a bug fix). |
Nyholm commentedOct 5, 2017
Tried to do it on the phone and failed. Will fix this when I get to a computer. Thank you for the reviews. |
This is required for some screen reader like Jaws
Nyholm commentedOct 6, 2017
Added the fix for branch 2.7 |
xabbuh commentedOct 6, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I wonder if we don't have to update any test fixtures. |
fabpot commentedOct 8, 2017
Thank you@Nyholm. |
This PR was merged into the 2.7 branch.Discussion----------[Form] Use for=ID on radio/checkbox label.| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |I recently let Europe's leading accessibility experts (Funkanu.se) review a site of mine, they gave me (among other) this feedback.> Putting the checkbox/radio input inside the label is great, but the label still needs the "for=ID". Screen readers like Jaws does not work properly without this attribute.Commits-------53d7857 Use for=ID on radio/checkbox label.
I recently let Europe's leading accessibility experts (Funkanu.se) review a site of mine, they gave me (among other) this feedback.