Use focus-within in hidden.module.css

Created on 24 August 2021, about 3 years ago
Updated 13 July 2023, about 1 year ago

Problem/Motivation

This is a followup issue to #3084166: Add a focus-within polyfill to core .

Convert hidden.module.css to use focus-within instead of focus for the benefits that it brings.

Example use-case

Allow arbitrary hidden-but-focusable skip-links that are nested with <ul><li>, such as the "Add new comment" link.

Proposed resolution

Convert hidden.module.css to use focus-within.

Remaining task

Update for stable9
Check for other themes

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
CSS 

Last updated 1 day ago

Created by

🇺🇸United States kentr

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

  • CSS

    It involves the content or handling of Cascading Style Sheets.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States xjm

    Thanks @mherchel for the context. :)

    Hiding patches for clarity. Saving credits for reviewers, but uncrediting #14 as it just duplicated the work in the MR in #12 and #13, which in turn were also just applying a one-word change to an issue fork instead even though I can still apply #2 to 10.1.x now. (Also uncrediting my own clicking of the MR rebase button.)

    As a change to module CSS, this is allowed in a Drupal minor version (so 10.1.x).

  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Also happy to see Drupal get more accessible!

  • Status changed to Needs review over 1 year ago
  • 🇫🇮Finland lauriii Finland

    Changing this to a bug since this is an accessibility improvement.

    I'm wondering if we should be making this change to Stable 9 too? It seems like it would be a relatively low risk accessibility improvement that we could ship to all themes.

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    For accessibility my answer is always yes. If it can be added lets do it.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Gauravvv Delhi, India

    Addressed #23, Updated changes in stable9 as well. Please review

  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Perfect

  • 🇺🇸United States xjm

    Fixing attribution.

  • 🇫🇮Finland lauriii Finland

    Sorry, I forgot to mention in #23 that we would also need a change record since we are changing Stable. The CR should mention what the implications of this change is, and how someone with a theme extending Stable could revert to the old behavior if this is causing regressions for them.

  • Status changed to Needs work over 1 year ago
  • 🇳🇿New Zealand quietone New Zealand

    Setting to NW to get the change record written.

Production build 0.71.5 2024