Skip to content
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

feat(range): provide an example to display the value #1714

Merged
merged 8 commits into from
Mar 23, 2023

Conversation

julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Dec 16, 2022

Description

This PR provides a new example in the input range documentation to show how to display the value as a label for better usability.

Regarding a11y, here is how I defined the HTML structure and attributes:

  • Check the rendering compared to the ODS design guidelines
  • Auto-check HTML markup for a11y (will need a real a11y review after that)
  • Enhance documentation (split HTML code and JS?)

Types of change

  • New feature (non-breaking change which adds functionality)

Live previews

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • My change introduces changes to the migration guide
  • I have updated the documentation accordingly
  • (NA) I have added tests to cover my changes
  • All new and existing tests passed

@netlify
Copy link

netlify bot commented Dec 16, 2022

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 7857317
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/641c167318eb21000783d790
😎 Deploy Preview https://deploy-preview-1714--boosted.netlify.app/docs/5.3/forms/range
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sonarcloud
Copy link

sonarcloud bot commented Dec 16, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Aniort
Copy link
Contributor

Aniort commented Jan 10, 2023

after some checkings, i think that we should use an output tag, as follow:

<div class="d-flex w-100 justify-content-between">
  <label for="customRange4" class="form-label">Example range</label>
  <output id="customRange4ValueText" for="customRange4" class="fw-bold"></span>
</div>
<input type="range" class="form-range" min="0" max="100" step="1" id="customRange4" onchange="updateLabelValue()">

it's seems to work well with screen readers

@julien-deramond
Copy link
Member Author

julien-deramond commented Jan 10, 2023

after some checkings, i think that we should use an output tag, as follow:
it's seems to work well with screen readers

It confirms what we talked about with @louismaximepiton in private. Thanks for the feedback @Aniort. I'll make some changes to go with it!

@B3nz01d B3nz01d mentioned this pull request Feb 2, 2023
4 tasks
@julien-deramond
Copy link
Member Author

julien-deramond commented Mar 13, 2023

@Aniort, this PR's ready for final a11y review based on #1714 (comment). Should be quick to double-check 😄
(please test only in light mode, our dark mode is a work in progress)

@Aniort
Copy link
Contributor

Aniort commented Mar 13, 2023

to avoid a double vocalization with both screen readers Jaws & NVDA please add ariahidden to output tag:
xx
and it'll be ok !

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

One thing and we're good

Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com>
@sonarcloud
Copy link

sonarcloud bot commented Mar 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@julien-deramond julien-deramond merged commit ff5a7ca into main Mar 23, 2023
@julien-deramond julien-deramond deleted the main-jd-range-usability branch March 23, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brand component docs Improvements or additions to documentation passed a11y review v5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants