-
Notifications
You must be signed in to change notification settings - Fork 21
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
Version 5.0.0 #456
Merged
Merged
Version 5.0.0 #456
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The task list component displays all the tasks a user needs to do, and allows users to easily identify which ones are done and which they still need to do. Refs: alphagov/govuk-design-system/pull/1994
These are only needed to preview the guide until the task list is released and available in govuk-frontend. This commit can be dropped prior to merge.
✅ Deploy Preview for govuk-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This maintains the usual flow of supporting the most recent two major versions
Statuses can now be provided as strings, hash or with a block, offering complete flexibility. Co-authored-by: Frankie Roberto <frankie@frankieroberto.com>
Update the classes to match the new ones upstream alphagov/govuk-frontend#3952
I suggest we make this the v5.0 branch and merge the other v5.0 work into it. |
From the a PR on `govuk-frontend`: > In testing the new lockup in various accessibility tools, I found that VoiceOver on macOS does not expose the SVG's title element in the Web Rotor's list of links, although it will announce it audibly when the link or graphic is focused. > > Additionally, VoiceOver on iOS only announced the 'GOV.UK' text if the logo graphic was by itself. It omitted it if there was other text (such as a product name) within the same link. > > Adding an aria-label to the SVG seems to rectify both of these issues. It doesn't appear to have side effects in any other screen readers that I tested or when VO announces the link or graphic audibly. alphagov/govuk-frontend#4497
Opps, applied it to the wrong element in #467
It would be nice to be able to simply add visually hidden text to links and buttons without having to manually construct the HTML. It comes in really handy when working in dense admin interfaces where there might just be enough space for 'View', but we want to give screenreader users and idea of _where_ the link will take them. ## Work so far - Split out `#extract_button_link_args` - Rework and simplify the link and button helpers - Add `govuk_visually_hidden` helper which makes creating visually hidden text easy - Add keyword arguments `visually_hidden_prefix` and `visually_hidden_suffix` which injects the visually hidden text before or after the link or button text ## Example use With keyword arguments: ```erb <%= govuk_link_to("Delete", "#", visually_hidden_suffix: "first item") %> ``` With a block: ```erb <%= govuk_link_to("#") do %> Delete <%= govuk_visually_hidden("first item") %> <% end %> ``` Both will output: ```html <a href="#" class="govuk-link">Delete<span class="govuk-visually-hidden"> first item</span></a> ``` Prefixes work in the same way: ```erb <%= govuk_link_to("Mr Jones", "#", visually_hidden_prefix: "Remove") %> ``` ```html <a href="#" class="govuk-link"><span class="govuk-visually-hidden">Remove </span>Mr Jones</a> ```
Turns out this should only be applied directly to focusable elements like links and buttons.
Turns out this should only be applied directly to focusable elements like links and buttons. Also added a test for the block syntax option, and refactored a bit.
These icons shouldn't be committed to git, as they're copied from `govuk-frontend` in a build step – and also ignored via `.gitignore`. In any case, we don't reference these icons from the guide as we use the x-govuk icon.
This fixes a bug where this syntax was no longer working in ERb: ```erb <%= govuk_link_to "/" do %> <%= "test" %> <% end %> ``` I think was because the private method was using `block.call` rather than passing the block to the `link_to` helper which then passes it to `content_tag` which then calls `capture(&block)` using the OutputBuffer.
If you use the block syntax, then the href is actually confusingly the variable named `name` as it is the first argument, rather than the one named `href`. Unfortunately the tests didn't pick this up as the mock for `url_for` always returned the right variable, even if passed `nil`. Swapping this out for a minimal implementation of `url_for` avoids these false positives.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following the release of GOV.UK Design System v5.0, govuk-components v5.0.0 will be released. The headline features are:
Release notes will be drafted in #469.