Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add govuk-visually-hidden-focusable class #859

Merged
merged 2 commits into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

🆕 New features:

- Add `govuk-visually-hidden-focusable` class

Adds `.govuk-visually-hidden-focusable` and deprecates `.govuk-visually-hidden-focussable` in order to fix the typo in the class name. Please consider updating your code as the next major release will remove the deprecated class.

([PR #859](https://github.com/alphagov/govuk-frontend/pull/859))

- Pull Request Title goes here

Description goes here (optional)
Expand Down
6 changes: 6 additions & 0 deletions src/utilities/_visually-hidden.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
@include govuk-visually-hidden;
}

/// @deprecated Deprecated as of release 1.1, replaced by `.govuk-visually-hidden-focusable`
.govuk-visually-hidden-focussable {
@include govuk-visually-hidden-focusable;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do

.className,
.secondClassName {
@include ...
}

Or does that run into problems?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried, but Sass docs struggles with that when @ ing the deprecation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also I think by generally defining the deprecated code separately make it easier to remove on major releases. We're doing the same with the font baseline adjustments.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good

.govuk-visually-hidden-focusable {
@include govuk-visually-hidden-focusable;
}

}