Problem/Motivation

GCDS has a component called <gcds-sr-only>, however some places in Drupal don't allow you to use custom components. For example, a results rewrite in views.

Steps to reproduce

  1. Create a view
  2. add fiend for node id
  3. rewrite the display as view<gcds-sr-only>{{ title }}</gcds-sr-only>
  4. Save
  5. See that the custom component is stripped

Proposed resolution

I think to keep things easy for site builders, we should have a class for sr-only so site builders can easily make content available to screen readers, but not visible on the page.

Comments

crow created an issue. See original summary.

crow’s picture

Title: Add screenreader only styles » Add screen-reader only styles

liam morland’s picture

Status: Active » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.