- Issue created by @tgoeg
- Merge request !9Issue #3473581: Added a configurable text field as required. → (Open) created by sayan_k_dutta
- 🇮🇳India koustav_mondal Kolkata
Installed the module. I tried to place the Admin Feedback Block but got some Js error. Moving it to Needs Work.
- 🇮🇳India sayan_k_dutta
Checked again, works fine for me @koustav_mondal. Please check the branch once and the specific drupal version for it.
- 🇮🇳India koustav_mondal Kolkata
Sorry for the confusion. Chceked again. Attaching videos for this. LGTB+
- 🇦🇹Austria tgoeg
Thanks for the improvement!
I'm not an a11y pro but I think this might not be enough. As stated in the original description, screen readers would not know the DOM has changed otherwise. Sorry for not providing these additional details initially.Gathering from https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attribut..., I think the new introductory text should be wrapped in something like this:
<div role="alert" aria-live="assertive" aria-atomic="true" id="feedback-live-region" class="sr-only"></div>
However,
sr-only
is bootstrap only, and, depending on the theme used, other classes might be necessary.
I'm OK with showing this message to everyone, but maybe there are use cases where this should only be shown to impaired users.Do you know of a standardized way in Drupal to style screenreader-only elements?
A checkbox in the config to enable this would be enough, then. I'm just a sysadmin, sorry I can't provide any more info here..A more general approach would be to define a configurable CSS class, so admins can easily set one that gets used in the theme.
(I know styling via an id would be an option, too, but using a class is easier and defining a custom class for an element is used in e.g. views as well, so it is a rather known concept in Drupal already). - Status changed to Needs review
about 2 months ago 4:36pm 12 February 2025 - 🇦🇹Austria tgoeg
See 🐛 A11y: aria-label approach to improve label accessibility, remove hardcoded heading levels Active . The DOM-update case seems to fixed there.
Building on that and thanks to your code I can now see where to adapt things.I'll attach a little patch just for showing this introductory text. However, it builds upon the other mentioned issue, so I don't want to create a MR yet (but can do so once it is merged).
Please test with
"drupal/admin_feedback": { "Improve a11y": "https://git.drupalcode.org/project/admin_feedback/-/merge_requests/10.patch", "Add intro text": "patches/admin_feedback_intro_text.patch" },
for the time being.