-
Notifications
You must be signed in to change notification settings - Fork 328
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
Update tabs component to WCAG 2.1 compliant focus style #1326
Conversation
7eb7652
to
c0698a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me – it looks like I've raised lots of comments but they're pretty much all about using the 'applied' palette rather than referencing yellow / black directly.
IE8 doesn’t support box-shadow so use border to indicate state. To prevent “jump” in selected state, make adjustments as this state modifies border width. Only use the black top border from the design which uses box-shadow to achieve a double border.
3b57efe
to
81809d0
Compare
Split from #1326 This amends the tab headings spacing on mobile and no-js view to be consistent with how we present the navigation on the Design System: Adjusts the padding/margin so that with the the list version of component that’s used on mobile and no-js we use have govuk-spacing(2) as bottom margin, consistent with what we do with on-page navigation in GOV.UK Design System when it's displayed as a list. For the desktop/js-enabled version of component remove bottom margin and use top and bottom padding instead. Also adjusts bottom margin of list item so that it’s applied on no-js version and add some more spacing under the tabs title.
Split from #1326 This amends the tab headings spacing on mobile and no-js view to be consistent with how we present the navigation on the Design System: Adjusts the padding/margin so that with the the list version of component that’s used on mobile and no-js we use have govuk-spacing(2) as bottom margin, consistent with what we do with on-page navigation in GOV.UK Design System when it's displayed as a list. For the desktop/js-enabled version of component remove bottom margin and use top and bottom padding instead. Also adjusts bottom margin of list item so that it’s applied on no-js version and add some more spacing under the tabs title.
Split from #1326 This amends the tab headings spacing on mobile and no-js view to be consistent with how we present the navigation on the Design System: Adjusts the padding/margin so that with the the list version of component that’s used on mobile and no-js we use have govuk-spacing(2) as bottom margin, consistent with what we do with on-page navigation in GOV.UK Design System when it's displayed as a list. For the desktop/js-enabled version of component remove bottom margin and use top and bottom padding instead. Also adjusts bottom margin of list item so that it’s applied on no-js version and add some more spacing under the tabs title.
background-color: transparent; | ||
box-shadow: inset 0 4px 0 0 $govuk-focus-colour, inset 0 8px 0 0 govuk-colour("black"); | ||
|
||
@include govuk-if-ie8 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the accordion component I've put a border + a smaller box-shadow for all browsers, which allows you to avoid the special IE8 wrapper stuff.
Not sure if it'd work here, but means it fallsback automatically without conditional stylesheets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @NickColley. Happy to revisit this after the audit and there's also this to consider: #1327
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :) Nice work
Split from #1326 This amends the tab headings spacing on mobile and no-js view to be consistent with how we present the navigation on the Design System: Adjusts the padding/margin so that with the the list version of component that’s used on mobile and no-js we use have govuk-spacing(2) as bottom margin, consistent with what we do with on-page navigation in GOV.UK Design System when it's displayed as a list. For the desktop/js-enabled version of component remove bottom margin and use top and bottom padding instead. Also adjusts bottom margin of list item so that it’s applied on no-js version and add some more spacing under the tabs title.
Split from #1326 This amends the tab headings spacing on mobile and no-js view to be consistent with how we present the navigation on the Design System: Adjusts the padding/margin so that with the the list version of component that’s used on mobile and no-js we use have govuk-spacing(2) as bottom margin, consistent with what we do with on-page navigation in GOV.UK Design System when it's displayed as a list. For the desktop/js-enabled version of component remove bottom margin and use top and bottom padding instead. Also adjusts bottom margin of list item so that it’s applied on no-js version and add some more spacing under the tabs title.
Split from #1326 This amends the tab headings spacing on mobile and no-js view to be consistent with how we present the navigation on the Design System: Adjusts the padding/margin so that with the the list version of component that’s used on mobile and no-js we use have govuk-spacing(2) as bottom margin, consistent with what we do with on-page navigation in GOV.UK Design System when it's displayed as a list. For the desktop/js-enabled version of component remove bottom margin and use top and bottom padding instead. Also adjusts bottom margin of list item so that it’s applied on no-js version and add some more spacing under the tabs title.
Split from #1326 This amends the tab headings spacing on mobile and no-js view to be consistent with how we present the navigation on the Design System: Adjusts the padding/margin so that with the the list version of component that’s used on mobile and no-js we use have govuk-spacing(2) as bottom margin, consistent with what we do with on-page navigation in GOV.UK Design System when it's displayed as a list. For the desktop/js-enabled version of component remove bottom margin and use top and bottom padding instead. Also adjusts bottom margin of list item so that it’s applied on no-js version and add some more spacing under the tabs title.
Iterate on #1245 to update the GOV.UK Frontend tabs component.
Solution implemented to support IE8
Tested in:
✅ Chrome 74
✅ Firefox 66 (including with overridden colours)
✅ Mac OS Safari 12.1
✅ Android Samsung Galaxy (Chrome)
✅ iOS XS / 8 (Safari)
✅ Edge 18
✅ Edge 16
✅ IE 9-11
✅ IE8 - see comments above
✅With Javascript disabled
✅ In review app "legacy" mode
Fixes #1306