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

Should the rule imagebutton_alt_exists contain the label check (label as parent or label for attribute)? #2057

Closed
shunguoy opened this issue Sep 25, 2024 · 1 comment
Labels

Comments

@shunguoy
Copy link
Contributor

shunguoy commented Sep 25, 2024

There are couple of issues:

  1. The rule currently doesn't check the label. For example,
<label for="GoBtn2">Go2</label>
<input type="image" name="Go2" id="GoBtn2" src="../support/btn_go.gif">

reports an error: The element of type "image" has no text alternative.

  1. does the image inside an input element need a separate check?
<label for="GoBtn3">Go3</label>
<button id="GoBtn3"><img src="../support/btn_go.gif"></button>

reports an error: The image has neither an accessible name nor is marked as decorative or redundant

test case: test/v2/checker/accessibility/rules/imagebutton_alt_exists_ruleunit/InputImg-hasNoAlt.html

Also note, in the test case, for an image button (input with type=image), "The element's [value] attribute must be omitted", however, Chrome doesn't omit the value as shown in the test case.

@shunguoy shunguoy added the T63 label Sep 30, 2024
@shunguoy
Copy link
Contributor Author

Triage: the alt is reuqired for the input type='image' and displayed on screen, otherwise, the default value is "Submit".

@philljenkins philljenkins mentioned this issue Nov 5, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant