Open dgdavid opened 9 months ago
I think we should remove the lang="en"
flag and set it only dynamically. The official Cockpit plugins also do not set it. https://github.com/cockpit-project/cockpit/blob/main/pkg/users/index.html
Setting on the server side is not possible with the current Cockpit backend, but we could do that with our own server.
I think we should remove the
lang="en"
flag and set it only dynamically.
That was our first though too.
Setting on the server side is not possible with the current Cockpit backend, but we could do that with our own server.
Since we will have our own server, I prefer sending the with the attribute if possible.
Since few months ago, Agama allows selecting supported languages for rendering its UI. However, it is not satisfying the Understanding Success Criterion 3.1.1, Language of Page.
In short, it's about reflecting the selecting language by using the
lang
attribute in the<html>
tag, which its useful forTo know more, read https://www.w3.org/WAI/WCAG21/Understanding/language-of-page.html
Please, note that this attribute it's set in the static src/index.html file, somehow out of the scope of the React application. Something like below could partially fix the issue
but bear in mind that the application will be rendered with the
lang="en"
at least once and then switch to the right language. This can probably be changed on the server side by sending an adaptedindex.html
file. In the end, the server already knows which language has been requested.