material-components / material-web

Material Design Web Components
https://material-web.dev
Apache License 2.0
8.71k stars 818 forks source link

md-radio not working on iOS browsers (Safari < 16.4 & Chrome ) with ElementInternals polyfill #5612

Open kkachniarz220 opened 1 week ago

kkachniarz220 commented 1 week ago

What is affected?

Component

Description

Radio component is not visible on iOS 15.8.2 (Safari & Chrome browsers). In console I`m getting an error:

Zrzut ekranu 2024-05-8 o 13 20 51 Zrzut ekranu 2024-05-8 o 12 53 25

As mentioned in HTML Standard:

If flags contains one or more true values and message is not given or is the empty string, then throw a TypeError.

Reproduction

https://lit.dev/playground/#project=W3sibmFtZSI6Im1hdGVyaWFsLWltcG9ydHMuanMiLCJjb250ZW50IjoiaW1wb3J0IFwiQG1hdGVyaWFsL3dlYi9yYWRpby9yYWRpby5qc1wiOyJ9LHsibmFtZSI6ImluZGV4Lmh0bWwiLCJjb250ZW50IjoiPCFET0NUWVBFIGh0bWw-XG48c2NyaXB0IHR5cGU9XCJtb2R1bGVcIiBzcmM9XCIuL21hdGVyaWFsLWltcG9ydHMuanNcIj48L3NjcmlwdD5cblxuPG1kLXJhZGlvPjwvbWQtcmFkaW8-XG4ifSx7Im5hbWUiOiJwYWNrYWdlLmpzb24iLCJjb250ZW50Ijoie1xuICBcImRlcGVuZGVuY2llc1wiOiB7XG4gICAgXCJsaXRcIjogXCJeMi4wLjBcIixcbiAgICBcIkBsaXQvcmVhY3RpdmUtZWxlbWVudFwiOiBcIl4xLjAuMFwiLFxuICAgIFwibGl0LWVsZW1lbnRcIjogXCJeMy4wLjBcIixcbiAgICBcImxpdC1odG1sXCI6IFwiXjIuMC4wXCJcbiAgfVxufSIsImhpZGRlbiI6dHJ1ZX1d

Workaround

I have not found a workaround.

Is this a regression?

Yes. This used to work, but now it doesn't.

Affected versions

1.4.1

Browser/OS/Node environment

Browser: Safari 15.8.2 OS: iOS 15.7.2 ElementInternals polyfill version: 1.3.11 (latest)

christophe-g commented 1 week ago

The lit.dev repro does not seem to be related with the issue ; )

kkachniarz220 commented 1 week ago

Thanks @christophe-g, fixed :)