-
Notifications
You must be signed in to change notification settings - Fork 331
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
Accordion 'open/close all sections' cannot be customised or translated #1325
Comments
Hi Paul, Thanks for raising. This has come up before a few times before – most recently in #1038. Unfortunately at the minute we don't have a decent solution for localisation / internationalisation. For now, we suggest that you copy the Javascript for this component into your service's codebase and make the adjustments required for the service you’re working on. I recognise this isn't ideal – in #1038 I mentioned that we were hoping to look at this properly in 'early [2019],' but we haven't got to it yet. Hope that helps, Ollie |
I've penned an MR to try to pull hardcoded text from data attributes and fall back to the existing English - could this be a suitable route for hardcoded text in the javascript? |
Thanks for doing that! 👏 It sounds like a sensible option, but as it introduces new conventions to the component API we need to spend a little bit of time understanding how it might work for other components – both existing, and new ones – and to make sure it's the right approach. Our team are currently prioritising work to make GOV.UK Frontend pass WCAG 2.1 requirements and we have an external audit coming up soon. Because of this, it may take a little while before we can review your PR. If this is blocking you, I still recommend copying the JS into your service as the best short-term solution. Thanks for your understanding. |
Hello, is this component ready for production use on a service which is not allowed to use javascript and is multi-lingual? Considering that this component is expiremental as of now would it be best to use an alternative? |
We ran into a similar problem when developing the pagination component. Each number originally had a visually hidden "page " suffix which we were struggling to translate without requiring teams to pass complex html. The way we solved this was by instead using I can see that @querkmachine has already started to try solving this using the html approach as part of the localisation work. That would in theory solve this as well, but I'm sticking my neck out for the |
govuk-frontend/src/components/accordion/accordion.js
Line 60 in 1eef89c
The accordion has hardcoded English text in javascript file, meaning it can't be translated to Welsh. Without being able to translate this our site can't enter Public Beta.
The text was updated successfully, but these errors were encountered: