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

Remove the JavaScript for the Details component #3464

Closed
3 tasks done
Tracked by #2621
romaricpascal opened this issue Mar 31, 2023 · 4 comments
Closed
3 tasks done
Tracked by #2621

Remove the JavaScript for the Details component #3464

romaricpascal opened this issue Mar 31, 2023 · 4 comments

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Mar 31, 2023

What

The JavaScript provides a polyfill for browsers that do not support the <details> element natively – in browsers that do support <details> it does not do anything.

Ensure that the component is not styled to suggest it can be expanded in browsers that do not natively support the <details> element (including IE11, Edge 12-18).

Remove the data-module attribute from the HTML in the Nunjucks macro.

Remove the generateUniqueID helper function, which is only used by the details polyfill.

Why

As of GOV.UK Frontend v5.0, JavaScript will only run in browsers that support ES6 modules. The only browser that supports ES6 modules but not the <details> element is 'Legacy' Edge (16-18) which does not justify the overhead of including the polyfill.

Who needs to work on it

Developers

Who needs to review it

Developers

Done when

Tasks

  1. design details sass / css
@romaricpascal romaricpascal changed the title Remove the Details component Remove the JavaScript for the Details component Mar 31, 2023
@36degrees 36degrees added this to the v5.0 milestone Apr 13, 2023
@36degrees 36degrees self-assigned this May 12, 2023
@domoscargin domoscargin self-assigned this May 31, 2023
@domoscargin
Copy link
Contributor

Looking at GOV.UK stats in April/May 2023 (Internal document):

IE11 is roughly around 0.04% of all users and sessions.
Edge 16: 0.0013% of users
Edge 17: 0.0016% of users
Edge 18: 0.0044% of users

Though worth noting that "0.0016% of users" is still 1000+.

@domoscargin
Copy link
Contributor

domoscargin commented Jun 8, 2023

PRs to:

Which would leave only the Dragon issue to look into

@querkmachine
Copy link
Member

Regarding Dragon specifically, this seems to be an old, old tale. We've reported issues to Nuance about Dragon not supporting basic HTML elements correctly, and they don't seem to care, because "Dragon is not compatible with web pages and web based services, [they are] not supported!"

I'm not keen to toss out the functional, semantically correct HTML we already have in order to support something that Nuance refuse to do themselves. It sucks for Dragon users, but it's not so unuseable that it's worth reworking the entire component for all users, IMO.

We already note in the Design System docs that the component doesn't work with all voice control software (with a link to yet another issue about Dragon). I think that's worth keeping in place for the time being.

@36degrees
Copy link
Contributor

We're going to treat the Dragon issue as separate to this and call this done 🎉

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

No branches or pull requests

4 participants