Skip to content
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

Links must have discernible text #8

Open
valokammi opened this issue Sep 3, 2023 · 4 comments
Open

Links must have discernible text #8

valokammi opened this issue Sep 3, 2023 · 4 comments

Comments

@valokammi
Copy link

valokammi commented Sep 3, 2023

Edit: Now got my browser in english for better description about issues from Pagespeed. And there is another issue too.
Testing in Google page speed Accessibility results drops because of this thing!
Pagespeed report about this: " Links do not have a discernible name
Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves the navigation experience for screen reader users."
Second issue that I found:
"Image elements do not have explicit width and height Set an explicit width and height on image elements to reduce layout shifts and improve CLS."

@valokammi
Copy link
Author

valokammi commented Sep 5, 2023

Fixed this my own! Changed to html mode because it was easier to edit and edited piwigo-random-backend.php file at the end.
In line 161 I added aria-label="' . htmlspecialchars($comment) . '" just after beginning of a <a tag.

Pagespeed now ok from this part. Did little extra and added ' . htmlspecialchars($comment) . ' to the alt attribute too for extra accessibility.

And added loading="lazy" to the img element. It is not a bad idea put it too to the code for better performance.

There should be and Image elements do not have explicit width and height attributes too, but I have no idea or skills to get that done. Also these should do to javascript mode too.

@moy
Copy link
Owner

moy commented Sep 6, 2023

Can you send a pull-request with all these?

@valokammi
Copy link
Author

Hmm. Create new Pull-request is disabled for me. And I`m not very good with this Github thing and coding, not sure that it is done right.

@valokammi
Copy link
Author

valokammi commented Sep 6, 2023

Did something in git hub but I´m sure I didn´t do it right.

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

No branches or pull requests

2 participants