alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.18k stars 325 forks source link

Radio circles are sometimes misaligned/not centred #5104

Closed tom-clarke-dluhc closed 2 months ago

tom-clarke-dluhc commented 4 months ago

Description of the issue

When using the radio component the concentric circles for a selected option are sometimes not centred for specific browser/zoom percentages.

an example screenshot from the govuk frontend showing circles that don't share a centre when zoom is set to 90%

Steps to reproduce the issue

On the frontend example, while using Edge browser and a zoom of 90% the middle circle is quite a way from the middle. This can also be seen for 80% and some other common zoom percentages.

Actual vs expected behaviour

I would expect the circles to always be centred but they aren't for some zooms.

Environment (where applicable)

github-actions[bot] commented 4 months ago

Uh oh! @tom-clarke-dluhc, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

🤖 Beep boop! This comment was added automatically by github/accessibility-alt-text-bot.

tom-clarke-dluhc commented 4 months ago

@kateriley1

querkmachine commented 4 months ago

This is caused by how browsers round fractional values to full pixels at certain zoom levels. There's a fuller explanation in the backlog issue here: https://github.com/alphagov/govuk-design-system-backlog/issues/59#issuecomment-1545549904

tom-clarke-dluhc commented 4 months ago

Thanks for the reply. Good to know that there's not much that can be done to resolve

romaricpascal commented 2 months ago

I'm going to close this one as there is no action we can take to solve this and we have some documentation in our backlog.