|
1 | 1 | """ |
2 | | -********* |
3 | | -|docname| |
4 | | -********* |
5 | | -
|
6 | | -This extension adds an accessibiligy stylesheet. |
7 | | -
|
8 | | -By the 'accessibility_style' config value (in conf.py of |
| 2 | +********************************************** |
| 3 | +|docname| - select an accessibility stylesheet |
| 4 | +********************************************** |
| 5 | +By setting the `accessibility_style` config value (in `conf.py <../common/project_template/conf.tmpl>` of |
9 | 6 | an interactive book project) you can select what accessibility stylesheet |
10 | | -you want to add ('normal', 'light', 'darkest' or 'none') |
| 7 | +you want to add (``normal``, ``light``, ``darkest``, or ``none``). |
11 | 8 |
|
12 | | -An accessibility stylesheet overs: |
| 9 | +An accessibility stylesheet covers: |
13 | 10 |
|
14 | | --Change of nav bar to color code based on Users using either mouse or |
15 | | -keyboard to navigate the menu |
16 | | --Adjusting bootstrap buttons to invert color on active and on focus for |
17 | | -accessibility for users |
18 | | --Changing default bootstrap buttons to follow WCAG 2.0 guidlines |
| 11 | +- Change of nav bar to color code based on Users using either mouse or keyboard to navigate the menu |
| 12 | +- Adjusting bootstrap buttons to invert color on active and on focus for accessibility for users |
| 13 | +- Changing default bootstrap buttons to follow WCAG 2.0 guidelines |
19 | 14 |
|
20 | | -acessibility.css reflects WCAG 2.0 AA compliance |
21 | | -acessibilitydarkest.css reflects WCAG 2.0 AAA compliance |
22 | | -accessibilitylight.css doesn't change bootstrap colors but adds |
23 | | -inversion |
| 15 | +| ``acessibility.css`` reflects WCAG 2.0 AA compliance |
| 16 | +| ``acessibilitydarkest.css`` reflects WCAG 2.0 AAA compliance |
| 17 | +| ``accessibilitylight.css`` doesn't change bootstrap colors but adds inversion |
24 | 18 |
|
25 | | -Personally we prefered WCAG 2.0 AA compliance, so accessibility.css |
| 19 | +Personally we prefered WCAG 2.0 AA compliance, so ``accessibility.css`` |
26 | 20 | reflects ideal changes |
27 | 21 |
|
28 | | -http://imgur.com/a/TSDNf |
29 | | -This shows the different CSS files from most compliance (left) to least |
30 | | -compliance (right) |
| 22 | +.. figure:: https://i.imgur.com/jFzkI6g.jpg |
| 23 | +
|
| 24 | + This shows the different CSS files from most compliance (left) to least compliance (right). |
31 | 25 | """ |
32 | 26 |
|
33 | 27 |
|
34 | 28 | def setup(app): |
35 | 29 | app.add_config_value("accessibility_style", "normal", "html") |
36 | 30 |
|
37 | | - # Since the `init_values()` method of the `app.config` object (Config class) |
| 31 | + # Since the ``init_values()`` method of the ``app.config`` object (Config class) |
38 | 32 | # is not invoked yet (will be invoked after the setup of all extensions), |
39 | | - # we need to access the raw config dictionary here |
| 33 | + # we need to access the raw config dictionary here. |
40 | 34 | acc_style = app.config._raw_config.get("accessibility_style", "normal") |
41 | 35 |
|
42 | 36 | if acc_style == "normal": |
|
0 commit comments