- Status changed to Needs review
about 1 year ago 3:15pm 25 August 2023 - last update
about 1 year ago 1 pass, 5 fail - 🇦🇷Argentina tguerineau
Patch Update
Summary:
This patch addresses the issue of making the countdown message screen reader compatible. The primary changes involve associating the countdown message with its corresponding field using the aria-describedby attribute and announcing important character count milestones using Drupal.announce().
Details:
1. Associated the countdown message with its input field using the aria-describedby attribute, improving accessibility for screen reader users.
2. Introduced logic to announce when there are only 10 characters left, when there are no characters left, and when the character limit is exceeded. These announcements are wrapped in Drupal.t() to ensure they're translatable, enhancing compatibility for multilingual sites.
3. The changes were tested using the Screen Reader extension for Chrome.Looking forward for reviews and feedback.
The last submitted patch, 3: make-countdown-message-screen-reader-compatible-3259480-3.patch, failed testing. View results →
- Status changed to Needs work
about 1 year ago 4:34pm 25 August 2023 - Status changed to Needs review
about 1 year ago 4:34pm 25 August 2023 - Assigned to hbrokmeier
- 🇺🇸United States cedewey Denver, CO
Hi Tom'as,
Thanks for another contribution to this project. This is awesome! I just tested this using the Screen Reader Chrome extension as well and it works as expected for me. I'm assigning this to Heather to see if she approves of this behavior as well and to review the code.
Here's a video of my test session → .
- Status changed to Needs work
about 1 year ago 10:19am 25 September 2023 - 🇧🇪Belgium joevagyok
Tests are failing and we need to test the existence of the aria-described by field.
+++ b/js/maxlength.js @@ -78,6 +81,15 @@ + if (available === 10) { + Drupal.announce(Drupal.t("Only 10 characters left")); + } else if (available === 0) { + Drupal.announce(Drupal.t("You have 0 characters left")); + } else if (available < 0) { + Drupal.announce(Drupal.t("You have exceeded the limit by @available characters", {'@available': Math.abs(available)})); + }
This should be a switch instead of else ifs.
- 🇦🇷Argentina tguerineau
Thank you for taking the time to review this patch!
Patch Updates:
- Use
switch
instead ofelse if
.
- Testing aria-describedby Attribute:testAriaDescribedbyAttribute()
, is introduced to ascertain the correct setting of the aria-describedby attribute by the maxlength.js script.Test Failures Noted:
We've observed the following test failures in the CI.
Unfortunately, I have been unable to run the tests locally, which has limited my ability to further diagnose and resolve the test failures.Potential Causes:
Given the nature of the updates in the patch, it's plausible that the changes to the character count announcements and their respective behaviors might be influencing the test outcomes. Specifically, the additional announcements or altered text/behaviors might not align with the current test expectations.Next Steps & Request for Assistance:
- If the test failures are related to the updated announcement behaviors, the tests might require updates to reflect the new expectations.
- Any advice, suggestions, or contributions to further diagnose or fix the test failures would be invaluable. - 🇮🇳India SandeepSingh199
Hi @tguerineau,
I reviewed your latest patch in local & found its working as expected. I hope you can mark this issue to Needs Review state. - Status changed to Needs review
about 1 year ago 4:46pm 5 October 2023 - last update
about 1 year ago 1 pass, 5 fail - 🇦🇷Argentina tguerineau
Thank @SandeepSingh199 for taking the time to review the patch and providing valuable feedback!
I have updated the issue state to "Needs Review" as per your suggestion.
The last submitted patch, 9: 3259480-9.patch, failed testing. View results →
- First commit to issue fork.
- Merge request !45Issue #3259480: Make countdown message screen reader compatible → (Merged) created by sokru
- Open on Drupal.org →Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7last update
8 months ago Not currently mergeable. - last update
8 months ago 6 pass - last update
8 months ago 6 pass - last update
8 months ago 6 pass - Status changed to RTBC
8 months ago 8:08am 28 March 2024 - 🇫🇮Finland sokru
Basically just rerolled the patch into MR and added few tests. Tested also manually, so setting the status to RTBC.
- 🇫🇮Finland simohell
Announcement works, but I would recommend following the UK gov style of adding more information to the plain "0/250" description part. A screen reader user can access the text but without context. Fe. Voiceover tells the user there is additional information available and accessing that outputs "0/250" - it woulg be helpful I think even just to add the word "characters" to give context.
- Assigned to joevagyok
- Status changed to Needs review
8 months ago 3:18pm 2 April 2024 - Status changed to RTBC
5 months ago 12:55pm 28 June 2024 - 🇧🇪Belgium joevagyok
@simohell where do you see this "0/250" description exactly?
- 🇫🇮Finland simohell
Oh. Sorry, that "0/250" case was using a custom setting. So it's not something with the module / patch. This looks great.
-
joevagyok →
committed 54a00af7 on 3.x
Issue #3259480: Adapt tests to mitigate issue with source element update...
-
joevagyok →
committed 54a00af7 on 3.x
-
joevagyok →
committed b395e7d1 on 3.x
Issue #3259480: Clean up test.
-
joevagyok →
committed b395e7d1 on 3.x
-
joevagyok →
committed e1843c7d on 3.x
Issue #3259480: Clean up.
-
joevagyok →
committed e1843c7d on 3.x
-
joevagyok →
committed b0acde9b on 3.x authored by
sokru →
Issue #3259480: Make countdown message screen reader compatible
-
joevagyok →
committed b0acde9b on 3.x authored by
sokru →
- Status changed to Fixed
5 months ago 10:14am 3 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.