I just came from a workshop on "Language and Accessibility" (as a follow-upp to a seminar that we had a month ago on the topic - the slides from the seminar are available (in Swedish) from https://www.kth.se/social/files/58c17d95f276545c4bc556c8/Spr%C3%A5k-och-tillg%C3%A4nglighet.pdf ). One of the issues that came up is providing users with dyslexia with material presented in the Dyslexie font ( Dyslexie Font: The dyslexia font which eases the reading ). Has anyone looked at being able to set a particular CSS file to be used for the user's Canvas UI based upon a user's profile? I imagine this to be an extension of the fact that the user can choose their UI language (for example, as commonly used here English or Swedish, based upon their user settings (as stored in the user's 'locale' attribute' in the format described in RFC 5646)). One approach would be to encode this desire for a special font in a subtag for the language and another would be to actually add a custom CSS attribute to the user object. Has anyone done anything like this?
Having an attribute that specifies a custom CSS file would probably be cleaner but would require a new field in the object. An interesting side benefit of the having both the ability to specify a custom CSS and font would be that one could have multiple language pages (ala Using tabs for content in three languages: Chip sandbox ) where the user's choice of language would the automatically the selected visible alternative.
Note that in the above when referring to a "custom CSS file" I am thinking in terms of choosing one from a set of files for the site, as opposed to having each user able to upload their own CSS file.
Interesting idea, Gerald.
Here's a couple of initial thoughts to perhaps get the ball rolling.
The example in the Chip sandbox will stop working at some point as the jQuery UI that provides the tabs is going bye-bye:Deprecated use of magic jQueryUI widget. It's not anytime soon according to the discussion and the fix is for us to add jQuery UI through the custom JavaScript.
That's not the issue you bring up, it just made me think of it. In the Chip sandbox, that page didn't use locale to determine what text to write, it actually had the foreign languages in the page itself. I18n support through the locale isn't the way to go here, either, as dyslexia isn't a recognized locale and so you would run into problems retasking a well-defined item for another purpose.
What you might be able to do is the custom data that can be written for each user. You could save a value that would indicate the person needs something different. Then, upon every page load, you check for the existence of that variable as part of the global custom JavaScript. If it is found, then you act appropriately to load the CSS that changes the font to the appropriate one. You might need to be careful when picking your fonts to make sure that there is support for all of the characters that you need. It might be something that is only applied to user content, while Canvas menus remain the same, or you might change it for the entire page.
The next step is making it easy for people to make that change. It could be a checkbox that you add to the user's settings page that they check if they want to use the Dyslexie font.
Planning should go into this so that you minimize the number of calls for custom data. That is, don't use one just for dyslexia, but think of how it can be used for other things you might need.