Skip to content

Empty link text for home link when only an image is displayed in the header #66

@rianrietveld

Description

@rianrietveld

This issue was raised by Stephany Watts.

Presently the alt attribute in the theme outputs as blank for the header image. This is set up in header.php in the theme, on line 28 https://github.com/mor10/simone/blob/master/header.php#L28

As I recall, the reason for leaving the alt attribute blank was because the header image is set up to be a link to the home page, and the alt attribute would typically be an image description which would get confusing (imagine for example someone who sets up their header image as a picture of a dog. The first content link you'd hit in that circumstance would be the alt text "German Shepard with a tennis ball".)

This is, from my understanding, one of those challenging accessibility edge cases that bumps up against how people commonly use WordPress. In the short term, your easiest solution is to augment the code in header.php (in a child theme) to include the alt text. In the meantime, I'd love to hear what Rian thinks of this and what solution she would suggest.

IMHO the best solution would be to use the site title as alt for the header image.
And then, because on the home page this will be a redundant link, remove the link from the image there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions