Content accessibility toolbar and setting cookie for font size


#1

Hi all - I’m seeing an issue in my TOC where the font size is bigger than it should be. It looks like there is a class fontsize being added to the body tag due to a cookie being set in the a11y.js file for the pressbooks theme createCookie("a11y-larger-fontsize","1"). Searching through the code it looks like this is toggled on and off in the file content-accessibility-toolbar.php but for the life of me I cannot figure out how to get this toolbar to show in WP. I feel like I am losing my mind a bit. There is a chance that my cookies are somehow borked in my browser and something got set - but seeing that this file is actually setting cookies and it seems to potential be in use… if anyone has more insight here would really appreciate it.


#2

FYI I did just erase the cookie and the font size reset - but am still confused and curious about how this was set via Pressbooks…


#3

Hi Bess,

You didn’t say which version you are running or where your book is hosted, but current major versions (Pressbooks > 5, McLuhan > 2, both released in Q1 of 2018) should have this button in the top right corner:

Font size toggle


#4

If you are running an older version, we identified a bug on subdirectory networks which would cause the setting from one book (or the root site) to affect all books on the network. This was resolved in https://github.com/pressbooks/pressbooks-book/pull/138.


#5

Thanks for the reply! Yeah hah - the version would have helped here in the description. I’m on PB 5.5.0, but using Luther with another custom theme on top of that. Wasn’t using McLuhan (as far as I know, can’t remember if this is part of PB 5.5.0). I couldn’t get the source of the problem - but I did clear the cookie and haven’t seen any issues. Will keep this issue open in case someone else happens to stumble on it - but doesn’t seem reproducible at this point.