-
Notifications
You must be signed in to change notification settings - Fork 345
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 tabbed carousel example for issue 955 #1120
Conversation
<label for="accessible-controls"> | ||
<input type="checkbox" id="accessible-controls" value="moreaccessible" aria-describedby="accessible-controls-desc"> | ||
Tablist carousel controls and captions displayed before and/or after the image. | ||
</label> | ||
<p id="accessible-controls-desc">This option is more accessible than rendering controls and captions on top of the image, because the controls are harder to perceive and captions are more difficult to read with rotating images behind them.</p> | ||
|
||
<label for="rotation-paused"> | ||
<input type="checkbox" id="rotation-paused" value="paused" aria-describedby="rotation-paused-desc"> | ||
Auto-rotation is initially paused (<a href="javascript:history.go(0)"><img class="reload" src="images/reload-icon.png" alt="">reload needed</a>). | ||
</label> | ||
<p id="rotation-paused-desc">This option controls whether the carousel is paused or playing on page load. The paused option improves accessibility for users with visual impairments and people who are distracted or confused by auto-rotation, but allows users to start auto-rotation using the start/stop button. If this option is changed, the page must be reloaded to see the effect on behavior.</p> | ||
|
||
<label for="rotation-disabled"> | ||
<input type="checkbox" id="rotation-disabled" value="norotate" aria-describedby="rotation-disabled-desc"> | ||
Auto-rotation is disabled. | ||
</label> | ||
<p id="rotation-disabled-desc">This option improves accessibility for users with visual impairments and people who are distracted or confused by auto-rotation by disabling the auto-rotation feature and removing the start/stop button from the user interface. Users can use the tablist to manually navigate through the slides.</p> |
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.
Some new words for the checkboxes. Followed N&N Guideline:
- Use positive and active wording for checkbox labels
Also, put back "checked" defaults for the first 2 checkboxes.
<label for="accessible-controls"> | |
<input type="checkbox" id="accessible-controls" value="moreaccessible" aria-describedby="accessible-controls-desc"> | |
Tablist carousel controls and captions displayed before and/or after the image. | |
</label> | |
<p id="accessible-controls-desc">This option is more accessible than rendering controls and captions on top of the image, because the controls are harder to perceive and captions are more difficult to read with rotating images behind them.</p> | |
<label for="rotation-paused"> | |
<input type="checkbox" id="rotation-paused" value="paused" aria-describedby="rotation-paused-desc"> | |
Auto-rotation is initially paused (<a href="javascript:history.go(0)"><img class="reload" src="images/reload-icon.png" alt="">reload needed</a>). | |
</label> | |
<p id="rotation-paused-desc">This option controls whether the carousel is paused or playing on page load. The paused option improves accessibility for users with visual impairments and people who are distracted or confused by auto-rotation, but allows users to start auto-rotation using the start/stop button. If this option is changed, the page must be reloaded to see the effect on behavior.</p> | |
<label for="rotation-disabled"> | |
<input type="checkbox" id="rotation-disabled" value="norotate" aria-describedby="rotation-disabled-desc"> | |
Auto-rotation is disabled. | |
</label> | |
<p id="rotation-disabled-desc">This option improves accessibility for users with visual impairments and people who are distracted or confused by auto-rotation by disabling the auto-rotation feature and removing the start/stop button from the user interface. Users can use the tablist to manually navigate through the slides.</p> | |
<label for="accessible-controls"> | |
<input type="checkbox" id="accessible-controls" value="moreaccessible" aria-describedby="accessible-controls-desc" checked> | |
Display controls and captions outside of image | |
</label> | |
<p id="accessible-controls-desc">This option is more accessible than rendering controls and captions within the image, because controls are easier to perceive and captions are easier to read without rotating images behind them.</p> | |
<label for="rotation-paused"> | |
<input type="checkbox" id="rotation-paused" value="paused" aria-describedby="rotation-paused-desc" checked> | |
Pause auto-rotation on load (<a href="javascript:history.go(0)"><img class="reload" src="images/reload-icon.png" alt="">reload needed</a>). | |
</label> | |
<p id="rotation-paused-desc">This option controls whether the carousel is paused or playing on page load. The paused option improves accessibility for users with visual impairments and people who are distracted or confused by auto-rotation, but allows users to start auto-rotation using the start/stop button.</p> | |
<label for="rotation-disabled"> | |
<input type="checkbox" id="rotation-disabled" value="norotate" aria-describedby="rotation-disabled-desc"> | |
Disable auto-rotation | |
</label> | |
<p id="rotation-disabled-desc">This option improves accessibility for users with visual impairments and people who are distracted or confused by auto-rotation by disabling the auto-rotation feature and removing the start/stop button from the user interface. Users can use the tablist to manually navigate through the slides.</p> |
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.
I also think the description text should be indented to align vertically with the label text.
Also, other settings pages that use checkboxes with descriptions usually make the description text lighter than the label text, so we could make the label text bold, so that it is more clearly the "call to action".
|
@jongund I liked your suggestion and updates to make the behavior options less hard-coded, and I had a thought to make it even easier to update and change, and bring the coding style more in line with common UI component patterns. I made an update to the way the defaults are checked and coded that I think simplifies the code even further (keeping the same behavior where it respects the checkbox settings in the HTML + the URL params). The second change I made was just to move the |
There needs to be some coordination on this pull request, I have been working on making changes based on today's call and all of a sudden my changes have been overridden and a bunch of files I have a separate pull request for the other carousel have been changed in this pull request. |
@mcking65 There are changes to some files in this pull request that probably should not be included:
I am not sure how these files got changed in this pull request, and it was most likely me since this pull request is been around for along time (7 months). I think this pull request should be limited to just adding the tabbed carousel example, so I would like to remove the changes to these files from the pull request. Since they are minor changes anyway and I have other pull requests that address the issues in these changes. Thank you especially to Sara and Carolyn for all the work you have done in improving the tabbed carousel example these past few months, looking forward to getting this merged soon. |
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.
Thanks for the nice focus ring, @jongund - looks great!
I think this is almost good to go now. I only have 2 comments:
- Please add the note about reduced motion system settings that was suggested in Add tabbed carousel example for issue 955 #1120 (comment) [Edit: I went ahead and committed this for you because we said it was missing at the last call]
- Why do all of the anchors have
href="#!"
? I don't know what that does. Should they just behref="#"
?
Giving +1 assuming that those 2 comments will be addressed.
@jongund I pushed 2 minor changes in:
Hope that's ok. So the only thing I'm still wondering about is the |
I fixed the Thanks for adding the note on the pause at start up. Jon |
@jongund, thank you, thank you for all your work on this!! |
Add tabbed carousel example (pull #1120) To resolve #955, adds an example of a carousel that uses the tabs pattern as carousel controls. Co-authored-by: Matt King <a11yThinker@Gmail.com> Co-authored-by: Scott Vinkle <scott.vinkle@shopify.com> Co-authored-by: Valerie Young <valerie@bocoup.com> Co-authored-by: Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> Co-authored-by: Sarah Higley <sarah.higley@microsoft.com>
To resolve #955, adds an image carousel that includes a tablist control.
Preview Link
Preview example carousel in the compare branch of this pull request
Review checklist
💥 Error: 500 Internal Server Error 💥
PR Preview failed to build. (Last tried on Apr 28, 2020, 6:15 PM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 Spec Generator - Spec Generator is the web service used to build specs that rely on ReSpec.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.