Skip to content

Fix: "Skip to transcript" button spacing (fixes #312)#313

Merged
joe-allen-89 merged 1 commit into
masterfrom
issue/312
Mar 27, 2025
Merged

Fix: "Skip to transcript" button spacing (fixes #312)#313
joe-allen-89 merged 1 commit into
masterfrom
issue/312

Conversation

@swashbuck

Copy link
Copy Markdown
Contributor

Fix #312

Fix

  1. Ensure "Skip to transcript" button does not take up space until in focus
  2. Add bottom margin to button when visible

Testing

  1. Using keyboard navigation, tab until you come to a "Skip to transcript" button.

@swashbuck swashbuck self-assigned this Jan 20, 2025
@swashbuck swashbuck added the bug label Jan 20, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👀

@kirsty-hames kirsty-hames left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works as expected thanks @swashbuck. Please see query regarding the use of .visually-hidden.

Comment thread less/media.less
}

&:not(:focus-visible) {
display: block;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's an open Core PR that relates to this. Going by the issue discussion the intention is to update 'Skip to...' buttons to use the .visually-hidden mixin. I can't see any issues have been raised to update the other plugins as of yet but do we want to include in this PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, @kirsty-hames . Since that PR is still open, I think it would be better to update it separately so as to not hold up this fix? That PR would just change .u-display-none to .visually-hidden, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The PR as is works as expected so happy to proceed 👍

When the Core #606 PR is merged this can be revisited. We'd still need .u-display-none but would replace the :focus-visible styles with .visually-hidden-focusable.

  // Skip to transcript button
  &__skip-to-transcript {
    margin-bottom: @item-margin;
    
    html:not(.has-accessibility) & {
      .u-display-none;
    }

    .visually-hidden-focusable;
  }

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.8.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Skip to transcript" button takes up space when hidden, lacks bottom margin

4 participants