-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logo
images should support alt text
#19
Comments
The University of South Carolina is a really good test case: https://sc.edu/about/offices_and_divisions/digital-accessibility/toolbox/best_practices/alternative_text/logo-alt-text/index.php logo:
images:
logo: grid_uofsc_formal.png
seal:
image: grid_seal.png
alt: University of South Carolina seal
small:
light: grid-usc-horiontal-rev-on-white.svg
dark: grid-usc-horiontal-rev-g-on-black.svg
alt: University of South Carolina logo
medium:
image: logo
alt: University of South Carolina logo
large: seal
In the next example, we define two logo:
images:
rev-on-white:
image: grid-usc-horiontal-rev-on-white.svg
alt: University of South Carolina logo
rev-on-black:
image: grid-usc-horiontal-rev-g-on-black.svg
alt: University of South Carolina logo
medium:
light: rev-on-white
dark: rev-on-black Once parsed, we should internally use this structure: logo:
images:
rev-on-white:
image: grid-usc-horiontal-rev-on-white.svg
alt: University of South Carolina logo
rev-on-black:
image: grid-usc-horiontal-rev-g-on-black.svg
alt: University of South Carolina logo
medium:
light:
image: grid-usc-horiontal-rev-on-white.svg
alt: University of South Carolina logo
dark:
image: grid-usc-horiontal-rev-g-on-black.svg
alt: University of South Carolina logo In other words, regardless of how
where specifying
That said, I'm tempted to simplify this slightly by having users give us small:
image:
light: logo-light.png
dark: logo-dark.png
alt: Dark logo alt text but this gets weird because the idea that small:
image:
light:
image: logo-light.png
alt: Light logo alt text
dark:
image: logo-dark.png
alt: Dark logo alt text So I think we should support these variants: small: string
medium:
image: string
alt: string
large:
alt: string
light: string # inherits alt
dark:
image: string
alt: string
# no image allowed because of light/dark I'd really like to say that logo
images:
logo-light:
image: logo-light.png
alt: Light logo alt text
small:
light: logo-light Note that in the above, we've now introduced logo
images:
logo-light:
image: logo-light.png
alt: Light logo alt text
small:
light:
image: logo-light.png
alt: Light logo alt text |
FWIW, I think Quarto wants to support |
This is the general structure we'll go with, but with
|
Quarto now has a |
@cscheid To confirm I've read the schema change correctly, it seems like the Quarto change adds supports for # [Ex 1a]
logo:
images:
logo: grid_uofsc_formal.png
rev-on-white:
path: grid-usc-horiontal-rev-on-white.svg
alt: University of South Carolina logo and then # [Ex 1b]
logo:
small: logo
medium:
light: rev-on-white
dark: rev-on-black But # [Ex 2]
logo:
small:
path: grid_uofsc_formal.png
alt: Logo of USC
medium:
light:
path: grid-usc-horiontal-rev-on-white.svg
alt: University of South Carolina logo
dark: ... If I've understood correctly, I'm not conceptually opposed to this restriction, but it's a little awkward in Python because even if we don't let users write Brand YAML "by hand" as in Ex 2, I'll still have to convert the restricted form (Ex 1a + 1b) into the full form (resembling Ex 2) once parsed. Because of that, I'm not going to be able to enforce the restriction when reading a Given the amount of context sharing this project introduces, I'd prefer to make the brand schema as explicit as possible. Which means I'd like to include Ex 2 in the schema, even if we don't advertise it much in docs and examples. What do you think? |
I think your request is something that @gordonwoodhull suggested we do already. I'll make the change and I'll report back. |
Next wrinkle: we currently allow
Thoughts @cscheid @gordonwoodhull? Option 3 is the most consistent in terms of how other fields work. No other top-level brand field lets you do logo: brand-yaml.png
# alt specifying directly...
logo:
small: brand-yaml.png
medium: brand-yaml.png
large: brand-yaml.png
# alt using images...
logo:
images:
brand-yaml: brand-yaml.png
small: brand-yaml
medium: brand-yaml
large: brand-yaml There's also useful signal in having logo: brand-yaml.png
logo:
path: brand-yaml.png
alt: The Brand YAML logo |
We should allow logo images to have alt text information attached to them.
The text was updated successfully, but these errors were encountered: