I thought that the language selector in the Foundation Site Style stack would set the language attribute of the starting html tag. However, this is not the case. I chose Dutch, and was expecting a opening tag like <html lang="nl"> or something similar to that. It was not the case. Changing the selector in the stack to another language (english) didn’t work either. Is this selector setting meant to create the language attribute of the opening html tag? Or do i achieve that in a different way?
Thanks!
Not to derail the original poster’s thread, but… I think setting the document’s language setting would be an interesting feature for RW to have built-in. Would this be a possibility @dan, @simon?
However, we’ve not had much call for this feature… if a lot of users want it we’ll see what we can do until, but then it’s pretty far down on the list — there’s so much other stuff we need to add that is more pressing
The language is set via JS APIs at page load in order to inform the browser what language the website is using. If you inspect the page in the browser, you will see that the proper language that you defined is set.
You cannot do View Source that shows that HTML file as if you were to open it inside a text editor. You need to Inspect Element on the page. This will display the site after all of the code has been interpreted.
I use JS because there is no direct way for us to modify this with the RapidWeaver APIs. I could use PHP; then it would show in View Source. However, then every Foundation page would need to be php. I did not want that, especially since JS does the job.
If you have javascript disabled then you have a pretty damn poor web experience nowadays. So many other things won’t work or won’t be displayed that the least of your problems is the language setting. Its not the 90’s anymore. The entire web relies very heavily on JS.
I know it does. And i am using javascript.
But how about a screen reader? Or how about the refreshable braille display? How about text browsers on linux / unix machines? Different people have different needs. Some people are blind, some are very aware about their security, some don’t have the money for modern machines. We could try to help all of those.
Don’t let the way sites are made interfere with their specific needs. It’s all about inclusion…
The text on your website is still the same correct? Its not going to magically change to anything different. Therefore all of these accessibility tools will still display the text on your site properly. If you have anything that shows any different, please let me know.