Comments (9)
- Yep, sure you can hide it if you duplicate the content
- Good idea, but it still needs for
<label for='id'> Blah <input id='id'></label>
- Sure I'll add an example
- value="" for your default value is fine, you can give it a prompt if you want "select blah" no need for title
- yeah, we should change the
from accessibility.
Don't leave me hanging, Nick!
from accessibility.
@shawnbot I've used Changing my mind on this. See below.section.fieldset > h1.fieldset-legend
on the airforce project. @nickbristow suggested I add aria-describedby
to complete the effect. Much more easily styled.
from accessibility.
Nice, thanks @andrewmaier. We should make this part of the guide if it's worth repeating!
from accessibility.
To summarize what I think I'm reading here:
- We must use fieldset/legend, but we can hide them in a way that keeps them accessible to screen readers and duplicate the content to aid in styling.
- Proper protocol for labels is:
<label for='id'> Blah <input id='id' aria-describedby='id'></label>
I added the area-describedby...is this right @nickbristow ? - Thanks!
- You can have an empty first option in
<select>
elements like so:value=''
...and we also need to update the form examples on the accessibility guide so that the markup is cleaner.
from accessibility.
Also my intention with that comment was -- please correct if I'm not interpreting the convo right! Thx, all!
from accessibility.
Ooooo, follow-up question to 1) -->
For checkboxes and radio buttons, is it true that if I use title
I don't also need label
?
from accessibility.
- We must use fieldset/legend
Fieldsets aren't required for accessibility as far as I'm aware because there are alternate, programmatic ways of grouping elements ( I originally thought that we could replace name
attributes for). If you do use them, however, you must have a legend (and deal with their ridiculous styling rules).<fieldsets/>
with <section/>
elements but, upon further consideration, I think I'm in the wrong here and that <fieldsets/>
should be used.
I'm going to noodle on a good way to style this and get back to you (I'll likely start with something like <fieldset><legend><span class="legend-text" /></legend></fieldset>
).
- If we're getting all fancy with aria stuff, it looks like we should use
aria-labelledby
rather thanaria-describedby
: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-labelledby_attribute (where the attribute points to theid
of the element that labels the current element). In context, that might look like this wonderful/terrible thing:
<div class="field field-radio">
<label for="dta-yes">
<input type="radio" name="dta" id="dta-yes" value="yes" aria-labelledby="dta-yes-label-text">
<span class="label-text" id="dta-yes-label-text">Yes</span>
</label>
</div>
from accessibility.
Closing as stale, on the assumption that the need will resurface if it still exists.
from accessibility.
Related Issues (20)
- Broken Link on the 18F Accessibility Guide Home Page
- Redirected or Broken Links on the 18F Accessibility Guide Tools Page
- Redirected Link and Confusing Text on the 18F Accessibility Guide Color Page
- Incorrect LABEL FOR and INPUT Field ID on the 18F Accessibility Guide Forms Page HOT 1
- Possible Heading Numbering Issue on the 18F Accessibility Headings Page
- Content Correction on the 18F Accessibility Guide Hidden Content Page
- Redirected Link on the 18F Accessibility Guide Hadden Content Page
- Confusing Content on the 18F Accessibility guide Language Page
- Different Content Styling on the 18F Accessibility Guide Tables Page
- Code Items Need Code Tag on Them on the 18F Accessibility Guide Tables Page
- Incorrect Table Caption on the 18F Accessibility Guide Tables Page
- Correct Content on the 18F Accessibility Guide iframes Page HOT 2
- Confusing Text on the 18F Accessibility Guide Links Page
- Wrong Skip Navigation Link Anchor Code in Example on the 18F Accessibility Guide Links and Repetitive Content Page
- Are Plugins Necessary on the 18F Accessibility Guide? HOT 1
- Incorrect Capitalization on the 18F Accessibility Guide Writing Guide Page
- Page Navigation Highlighting is Missing on the 18F Accessibility Guide Writing Guide Page HOT 1
- Instructions for generating and running site locally are out of date HOT 1
- pa11y fails when running in GitHub HOT 1
- 508 Compliance for web interface HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from accessibility.