Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARIAMixin not polyfilled on Firefox #110

Open
bennypowers opened this issue Mar 16, 2023 · 0 comments
Open

ARIAMixin not polyfilled on Firefox #110

bennypowers opened this issue Mar 16, 2023 · 0 comments

Comments

@bennypowers
Copy link
Contributor

Consider this example custom element codepen:

<x-menu>Menu</x-menu>
<script type="module">
import 'element-internals-polyfill';

customElements.define('x-menu', class XMenu extends HTMLElement {
  #internals = this.attachInternals();
  constructor() {
    super();
    this.#internals.role = 'menu';
  }
});
</script>

Chromium 111 correctly reports the menu role:

image

Firefox 110 does not

image

FWIW, GNOME Web 44 nightly also does not report the menu role, but it's not clear to me why not, since it implements role on ElementInternals
image

image

I believe that this happens because the polyfill just checks for the existence of ElementInternals on globalThis and quits when it finds one, assuming the vendor fully implemented everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant