mui / mui/material-ui

[a11y] Add first class support for REM

Open
#32,703 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accessibility scope: all components type: new feature
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Summary 💡

As of today MUI does a terrific job with Accessibility, including default REM support for Typography.

This feature request intends to raise the issue with limiting REM support to just Typography and Iconography.

For example, using default MUI I go to my browser settings and I change the font size to "Very Large" in Chrome and here is how the Stepper component looks like:

Screen Shot 2022-05-09 at 11 43 26 AM

Notice that just changing the font size in the Browser makes MUI change the font size of the stepper text and now things are not centered

Examples 🌈
Button

Here is what I've done to change the button defaults to use rems

https://codesandbox.io/s/mui-rem-overrides-0cntz9

Stepper

This one seems more complicated to fix given that the centering of the SVG text is done in Javascript I believe

https://codesandbox.io/s/mui-rem-overrides-stepper-bl1f0s?file=/index.js

Motivation 🔦

I intend to use MUI out of the box and have REM support across the board where changing the Browser font size will not result in default MUI components looking weird and not aligned well

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Button and Stepper examples linked in the issue, then inspect the corresponding MUI component behavior when the browser font size is set to Very Large. Compare the default rendering with the REM overrides shown in the CodeSandbox examples; done means MUI components retain appropriate sizing and alignment when browser font size changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
accessibility, design, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.