Posted by lenlamberg on May 17, 2023 at 8:38pm
I am working on a Drupal 10 site with a Bootstrap 5 (Barrio) custom theme. I have some older followers who would find it easier to view the site if the type was larger. I want to provide a large-print option for them. Is there a way (such as a user-selectable option) to accomplish this through the theme?
It looks as if "Userway" is an option, but it is expensive and offers several features that I don't need.
Comments
Generally speaking, the best
Generally speaking, the best way to do this is to ensure your site works well with the zoom feature that is part of the web browser.
This is a good question. If
This is a good question. If you wanted to go the route of doing this outside of using the browsers zoom settings, you'd essentially want to create a separate stylesheet with larger font sizes and attach it to each page based on the users setting. Either a session setting or a config setting.
Then in a theme or module hook, attach the library that contains the larger font sizes onto the page based on those settings.
In general you should support
In general you should support zooming in with browser and/or operating system up to 200%. Some users already have predifined settings and are used to these controls.
There is however also the technique to add separate font-size option to the site. It is said that this may be easier to use for people who are not experienced in use of web browsers. This however probably needs setting some user specific cookies so that the selected text size won't change automatically and might be blocked by GDPR tools.
https://www.w3.org/WAI/WCAG21/Techniques/general/G178.html
I have not used or reviewed this module so I can't vouch for it, but it would seem to do what you are trying to acchieve: https://www.drupal.org/project/text_resize
Thanks much
I am going to try the solution offered by simohell. I believe it is similar to the solution slugolicious offered on stackexchange: https://stackoverflow.com/questions/76275989/drupal-is-there-a-large-pri...