mui / mui/material-ui

[Radio] buttons appear broken when JS fails to load

Open
#34,587 2 comments 0 reactions 1 assignee View on GitHub

@mnajdova is already working on this.

Since Oct 4, 2022.

scope: radio type: expected behavior
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
Steps to reproduce 🕹

Steps:

  1. Disable JavaScript in your browser.
  2. Visit Radio Button docs
  3. Click "Other" in the first radio group example.
Current behavior 😯

The "Other" radio button does not fill in, and provides no feedback that it was selected. It does, however, seem to be updated if I check the currently selected item in the console: document.querySelector('input[name="radio-buttons-group"]:checked').value;.

Expected behavior 🤔

The "Other" radio button fills in after being clicked, so that the user is aware that their choice has been made.

Context 🔦

Although the reproduction steps involve manually disabling JavaScript, JS more often fails to load for different reasons (Everyone has JavaScript, right?). Forms are a good candidate for employing progressive enhancement, and ensuring that they can work without JavaScript will make for more resilient, reliable, and accessible websites.

Your environment 🌎

Browser: Firefox 105.0.1

npx @mui/envinfo
  System:
    OS: Windows 10 10.0.19044
  Binaries:
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.2.2 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.53)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.