-
Notifications
You must be signed in to change notification settings - Fork 334
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
Review accordion bug on mobile with summary focus state #2322
Comments
It seems that the issue is the font size and line height set in the enclosing We explicitly set these properties to stop Elements, as well as browser default stylesheets, or other stylesheets, interfering with the h2 as it's not using the govuk-heading-m class. See #1796 |
I've been playing around with removing the two explicitly set line-heights on the button and the toggle: .govuk-accordion__section-button {
@include govuk-text-colour;
@include govuk-font($size: 24, $weight: bold, $line-height: 1.25);
display: block;
margin-bottom: 0;
padding-top: govuk-spacing(3);
}
.govuk-accordion__section-toggle {
@include govuk-font($size: 19, line-height: 1);
color: $govuk-link-colour;
} Note that line height is still set by the The margin between the summary list and the heading and toggle needs increasing as a result so that there's a gap between each (in these screenshots, it's been increased to Before vs AfterBefore vs After in legacy modeBefore vs After of
|
Note: changes still need to be made and pushed to the accordion branch before this ticket can be closed. |
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
Fix pushed to 98f67a5 for testing |
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
@vanitabarrett Great investigation, this seems to have fixed the issue 🎉 Tested this on Galaxy S21 on Chrome, FF and Samsung Internet. |
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
We were explicitly setting line-heights on the button and the toggle - normally the govuk-font mixin will do this for us and will choose a line-height value appropriate to the font size. We were seeing an issue with the focus state on smaller screens where there was a thin black line between lines. See #2322 for more detail. This commit removes the explicitly set line-height so that the focus state displays as expected.
What
There is an issue with the focus state on mobile when there are multiple lines in the summary, where the focus state underline is rendered as a thin line
This impacts Android and Samsung Internet as iOS doesn't show the focus style (but the issue can be replicated in desktop Chrome emulator too, for ease of debugging).
Why
We should align the focus state with the GOV.UK style, at the moment it looks a bit broken.
Who needs to know about this
Developers, designer
Done when
The text was updated successfully, but these errors were encountered: