Skip to content

Create accessibility vignette#2518

Merged
hadley merged 8 commits intomainfrom
accessibility
May 10, 2024
Merged

Create accessibility vignette#2518
hadley merged 8 commits intomainfrom
accessibility

Conversation

@hadley
Copy link
Member

@hadley hadley commented May 7, 2024

Including advice fixing the colour contrast issue caused by using the danger colour on a light navbar background (and apply that advice to pkgdown itself)

Fixes #2344. Fixes #2283.

Including advice fixing the colour contrast issue caused by using the danger colour on a light navbar background (and apply that advice to pkgdown itself)

Fixes #2344. Fixes #2283.
@hadley hadley requested a review from maelle May 7, 2024 22:43
@github-actions
Copy link

github-actions bot commented May 8, 2024

hadley added a commit that referenced this pull request May 8, 2024
Need to merge after #2518 (since the vignette will need a small update) and #2516 (since `check_built()` has moved).

Fixes #2357

* If you adjust any colours from the default theme (including the syntax highlighting theme), you should double check that the contrast between the background and foreground doesn't make any text difficult to read. A good place to start is running a representative page of your site through <https://wave.webaim.org>.

* The default colour of the development version label makes a slightly too low contrast against the pale grey background of the navbar. This colour comes from the bootstrap "danger" colour, so you can fix it by overriding that variable in your `_pkgdown.yml`:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could there be another solution to this, for instance pkgdown setting it if it is not set by the configuration and if there is no Bootswatch theme?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly, but the idea of just randomly patching one colour from the theme seems unappealing to me, especially since it only affects dev sites and that the purpose of the red is just to highlight that you're looking at a dev version, the text is not actually that important, and the contrast isn't that bad.

@hadley hadley merged commit c76d8da into main May 10, 2024
@hadley hadley deleted the accessibility branch May 10, 2024 21:02
SebKrantz pushed a commit to SebKrantz/pkgdown that referenced this pull request Jun 1, 2024
Including advice fixing the colour contrast issue caused by using the danger colour on a light navbar background (and apply that advice to pkgdown itself)

Fixes r-lib#2344. Fixes r-lib#2283.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add accessibility vignette Increase contrast of default dev version label

2 participants