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
Image has a long description attribute #108
Comments
|
This is a brilliant idea and a nice feature to add to a future version 👌 |
|
@jackdomleo7 , I would like to pick this issue. Please assign it to me. |
|
@Deep1Shikha absolutely 🙂 |
|
Accidentally clicked the close button - for auditing |
|
@Deep1Shikha are you still working on this one? If not, maybe I can pick it up :) |
|
Doesn't look like @Deep1Shikha has made any progress yet (https://github.com/Deep1Shikha/Checka11y.css). Maybe we could give them a week to respond and if not, I can assign to @alvaromontoro? |
|
@jackdomleo7 assign it to me. I will work on it this week(end). |
…leo7#151) These changes address jackdomleo7#108 and jackdomleo7#151. Summary of changes: - Add warning when longdesc is present - Add error when longdesc has some invalid values (empty, containing white spaces, or image urls) - Add examples to the demo page - Add tests for the new warnings and errors - Update the list of codes - Build the library - Switch the order of warnings and errors (jackdomleo7#151)
Describe the new a11y feature or project enhancement
The
longdescattribute in images is deprecated and should not be used. It is not fully supported by HTML5, browsers, or screen readers. When present, it is commonly misused (it should point to an URL that is not an image).Describe the solution you'd like
Show a warning if:
longdescattribute. Recommend the removal of the attribute and adding the information on the same page (e.g. with anaria-describedby)Show an error if:
longdescis not a URL (this may be tricky as it could be a relative path).longdesccontains spaces (then it would be text and not a URL)londgescis a link to an image. This could be tested via CSS by checking if the end of the value is an image extension (e.g. ".jpg", ".jpeg", ".png", ".gif", etc.)longdescis empty.Testing the first two points may be tricky and lead to false positives (e.g. a URL that has not been encoded and contains white space). Because of that, maybe those two cases should be ignored.
Link(s)
The text was updated successfully, but these errors were encountered: