Skip to content

Comments

[v10] Add support for icon buttons#1712

Open
colinrotherham wants to merge 7 commits intocomponent-sizefrom
component-button-icon
Open

[v10] Add support for icon buttons#1712
colinrotherham wants to merge 7 commits intocomponent-sizefrom
component-button-icon

Conversation

@colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Nov 27, 2025

Description

This PR adds support for button with icons

It was split out from #1660 and unblocks #1719

Inputs and icon buttons

Checklist

@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 November 27, 2025 16:05 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 November 27, 2025 16:48 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 November 27, 2025 16:54 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 November 27, 2025 17:22 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 November 28, 2025 10:23 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 November 28, 2025 10:24 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 November 28, 2025 21:19 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 December 1, 2025 17:43 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 December 1, 2025 17:50 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 December 5, 2025 15:27 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 December 9, 2025 14:01 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 December 22, 2025 09:42 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 January 2, 2026 18:28 Inactive
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 January 15, 2026 09:08 Inactive
@colinrotherham
Copy link
Contributor Author

This is the iOS default for regular text inputs:

background-color: canvas;
color: canvastext

The GOV.UK Frontend uplift added this warning:

// Setting any background-color makes text invisible when changing colours
// to dark backgrounds in Firefox (https://bugzil.la/1335476). As
// background-color and color need to always be set together, color should
// not be set either

So we should test our select menu fix which goes against that:

color: $nhsuk-text-colour;
background-color: $nhsuk-input-background-colour;

Setting background-color: canvas; works the same in iOS but (in theory) is dark mode friendly

MatMoore added a commit to NHSDigital/dtos-manage-breast-screening that referenced this pull request Feb 9, 2026
A design system version of this component is currently being tested, and
we have found that in NVDA, the icon is being announced as “Search
graphic” instead of just “Search” so we’re going to move the aria-label
to the button element itself, keeping aria-hidden="true" set on the
nested SVG.

nhsuk/nhsuk-frontend#1712 (comment)
@anandamaryon1
Copy link
Contributor

This is the iOS default for regular text inputs:

background-color: canvas;
color: canvastext

The GOV.UK Frontend uplift added this warning:

// Setting any background-color makes text invisible when changing colours
// to dark backgrounds in Firefox (https://bugzil.la/1335476). As
// background-color and color need to always be set together, color should
// not be set either

So we should test our select menu fix which goes against that:

color: $nhsuk-text-colour;
background-color: $nhsuk-input-background-colour;

Setting background-color: canvas; works the same in iOS but (in theory) is dark mode friendly

Looks like that Firefox bug was fixed 5 years ago. Fine in latest but…

Firefox 60, it is broken, select text is unreadable. Along with primary icon buttons.
image

background-color: canvas;
color: canvastext;

Fixes the iOS input background display issue. 👍

@colinrotherham colinrotherham changed the base branch from main to support/10.x February 9, 2026 17:21
@colinrotherham colinrotherham changed the title Add support for icon buttons [v10] Add support for icon buttons Feb 9, 2026
@nhsuk nhsuk deleted a comment from anandamaryon1 Feb 9, 2026
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 February 9, 2026 17:21 Inactive
@nhsuk nhsuk deleted a comment from anandamaryon1 Feb 9, 2026
@nhsuk nhsuk deleted a comment from anandamaryon1 Feb 9, 2026
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 February 9, 2026 17:24 Inactive
@colinrotherham
Copy link
Contributor Author

colinrotherham commented Feb 9, 2026

@anandamaryon1 I've updated the changelog entry regarding "aria-label" and the header search

Shall we pick up the search input background colour issue in #1660?

We should raise a separate issue for the Firefox 60 custom colours too

This PR now targets v10.x

@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 February 10, 2026 08:32 Inactive
@colinrotherham colinrotherham changed the base branch from support/10.x to component-size February 23, 2026 14:35
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1712 February 23, 2026 14:38 Inactive
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants