Browser zoom unit for accessibility [css-values-and-units]
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
Currently all browsers scale the size of a pixel in order to zoom into a page by default. As a result, a zoomed in viewport is indistinguishable from a narrower viewport. This may result in unintended layout shifts as media queries are triggered as well as problems scaling responsive typography to be compatible with SC 1.4.4.
CSS authors need a way to identify zoom level so that we can create affordances for accessibility issues that may arise as a result of how zoom is currently implemented.
Two possible solutions:
- A CSS keyword value that is effectively a unitless scale factor and can be used in calc functions.
h1 {
font-size: calc(6vw * zoom);
}
- Setting a standard for browsers to zoom the root font size instead of the size of a pixel. This will enable people to have finite control over what scales using relative units. Scale factor can be discovered with
calc(1rem / 16px).
Note: I don’t expect this to be an acceptable solution as the web has tried this and moved away from it to create a more consistent experience as many websites don’t use relative units.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the css-values-and-units context named in the issue and review its two proposed approaches for exposing browser zoom to CSS authors. No specific file or test is identified; done would require an agreed standard solution that addresses zoom-related layout and responsive typography concerns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- accessibility
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100