Skip to content

role-img-alt and svg-img-alt help text name only the img role, though both match role="image" #5272

Description

@chutchins25

Product

axe-core

Issue Description

Since #5248, role-img-alt and svg-img-alt match both role="img" and role="image", but the rule metadata still names only img:

  • role-img-alt — description: Ensure [role="img"] elements have alternative text; help: [role="img"] elements must have alternative text
  • svg-img-alt — description: Ensure <svg> elements with an img, graphics-document or graphics-symbol role have accessible text; help: <svg> elements with an img role must have alternative text

A user who authored <div role="image"> gets a message naming a role they didn't write.

This was deliberately left out of #5248: changing these strings regenerates locales/_template.json, invalidates the corresponding translations until they're retranslated, and needs a matching axe-rule-help update.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions