-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Slider does not show changed label value for keyboard users fix #152886
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
Conversation
… appropriate a11y semantic attributes to slider
Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
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 fix! Looks good to me, just left one question.
@@ -1818,6 +1818,7 @@ class _RenderSlider extends RenderBox with RelayoutWhenSystemFontsChangeMixin { | |||
final double increase = increaseValue(); | |||
onChanged!(increase); | |||
onChangeEnd!(increase); | |||
_state.showValueIndicator(); |
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.
Should we check whether _state is mounted before? Like:
if (!_state.mounted) {
return;
}
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.
Agreed! Added check like code snippet in lines 1493 - 1495.
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.
LGTM:) Thanks!
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
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.
LGTM, thanks for the fix!
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.
Code looks good to me. But should we wait to show the label until they use arrow keys, or should we show it right away once the slider is focused? If somebody using keyboard interaction just wanted to see the label, they'd have to go either up or down first which feels awkward. Also, in the video the label appearing briefly before moving to the next value looks jerky. Showing the label on focus seems like it would be smoother, but not doing so originally seemed intentional.
Thanks for catching this! I just checked the Material Design website, seems based on the specs here, we probably should show the label right away once the slider is focused. |
Thanks for the catch as well! Created a new issue (#152961) with corresponding PR (#152960) to show label to user on focus |
Manual roll requested by tarrinneal@google.com flutter/flutter@1dd7141...0a7f8af 2024-08-06 rmolivares@renzo-olivares.dev Support clearing selection programmatically through SelectableRegionState (flutter/flutter#152882) 2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from aabd582e9c7e to 206e86ee8a40 (4 revisions) (flutter/flutter#152962) 2024-08-06 49699333+dependabot[bot]@users.noreply.github.com Bump actions/upload-artifact from 4.3.4 to 4.3.6 (flutter/flutter#152964) 2024-08-06 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.15 to 3.26.0 (flutter/flutter#152965) 2024-08-06 andrewrkolos@gmail.com [tool] Guard process writes to frontend server in `ResidentCompiler` (flutter/flutter#152358) 2024-08-06 zanderso@users.noreply.github.com Fix Linux_android_emu tests late initialization errors (flutter/flutter#152932) 2024-08-06 fluttergithubbot@gmail.com Marks Mac integration_ui_test_test_macos to be flaky (flutter/flutter#152213) 2024-08-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#152956) 2024-08-06 pateltirth454@gmail.com [API Examples] `scroll_direction.0_test.dart` & `growth_direction.0_test.dart` (flutter/flutter#152941) 2024-08-06 jonahwilliams@google.com [devicelab] opt gallery benchmarks and platform view test into merged thread mode. (flutter/flutter#152940) 2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from e97955bf12ac to aabd582e9c7e (1 revision) (flutter/flutter#152948) 2024-08-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#152945) 2024-08-06 59215665+davidhicks980@users.noreply.github.com [material/menu_anchor.dart] MenuAnchor focus refactoring for RawMenuAnchor (flutter/flutter#150950) 2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 99da2cab3f6d to e97955bf12ac (2 revisions) (flutter/flutter#152944) 2024-08-06 gazal.gafoor.k@gmail.com fix: add parameter to maintainState of SearchDelegate (flutter/flutter#152444) 2024-08-06 34465683+rkishan516@users.noreply.github.com Feat: Add fillColor property for cupertinoCheckbox (flutter/flutter#151761) 2024-08-06 42016383+DBowen33@users.noreply.github.com Slider does not show changed label value for keyboard users fix (flutter/flutter#152886) 2024-08-06 nate.w5687@gmail.com Add Nate Wilson to authors (flutter/flutter#152907) 2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7fc38bef4775 to 99da2cab3f6d (1 revision) (flutter/flutter#152934) 2024-08-06 engine-flutter-autoroll@skia.org Roll Packages from 82e8d1e to 551bde5 (12 revisions) (flutter/flutter#152930) 2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 84116159ebfc to 7fc38bef4775 (1 revision) (flutter/flutter#152924) 2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from f75ffb65cfe3 to 84116159ebfc (1 revision) (flutter/flutter#152917) 2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from f5f6e966e7e7 to f75ffb65cfe3 (2 revisions) (flutter/flutter#152915) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ter#152886) Fix issue to where keyboard users could not see visual indicator label of changed value in Slider Before: [Screen recording 2024-08-05 12.16.24 PM.webm](https://github.com/user-attachments/assets/89b99423-7856-4b25-86de-b211b2dbe178) After: [Screen recording 2024-08-05 12.38.20 PM.webm](https://github.com/user-attachments/assets/641f9065-8279-4b79-89b1-b5bcd3d691a8) Fixes flutter#152884 Fixes b/340638215
…ter#152886) Fix issue to where keyboard users could not see visual indicator label of changed value in Slider Before: [Screen recording 2024-08-05 12.16.24 PM.webm](https://github.com/user-attachments/assets/89b99423-7856-4b25-86de-b211b2dbe178) After: [Screen recording 2024-08-05 12.38.20 PM.webm](https://github.com/user-attachments/assets/641f9065-8279-4b79-89b1-b5bcd3d691a8) Fixes flutter#152884 Fixes b/340638215
Fix issue to where keyboard users could not see visual indicator label of changed value in Slider
Before:
Screen recording 2024-08-05 12.16.24 PM.webm
After:
Screen recording 2024-08-05 12.38.20 PM.webm
Fixes #152884
Fixes b/340638215
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.