You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opting in to use accessibility_label_for_image, I would expect to get a warning every time a default accessibility label is used, but there's no warning for missing labels when the image is an SF Symbol.
While this is documented behaviour in the rules, I consider it a bug because the rule is opt-in for people who want to have better accessibility labels and just describing the icon is not generally a good label.
It is true that some SF Symbols have default accessibility labels, like how plus has the default label "Add", many others simply fall back to the name of the icon, like clock.arrow.circlepath.
If others disagree, this might just be a feature request to allow us to also require a11y labels when Image(systemName:) is used.
The text was updated successfully, but these errors were encountered:
I think when I was doing this initially I was trying to minimize false positives and since some SF Symbols do get default labels I erred on the side of not triggering errors for that constructor. In hindsight though I agree that it makes more sense for this rule to always require labels for system images — not only are there lots of symbols that don’t get default labels, but the default ones could often be improved upon and given more context (“Add ____” is often better than “Add” to be clear about what the plus adds).
Since contributing this rule I’ve actually joined the accessibility team at Apple, which means I’d have to go through some approvals to contribute to open source projects, but if someone wants to take this on I’d support this enhancement and think it should be pretty straightforward to remove the special case for allowing Image(systemName:)
New Issue Checklist
Describe the bug
When opting in to use
accessibility_label_for_image
, I would expect to get a warning every time a default accessibility label is used, but there's no warning for missing labels when the image is an SF Symbol.While this is documented behaviour in the rules, I consider it a bug because the rule is opt-in for people who want to have better accessibility labels and just describing the icon is not generally a good label.
It is true that some SF Symbols have default accessibility labels, like how
plus
has the default label "Add", many others simply fall back to the name of the icon, likeclock.arrow.circlepath
.If others disagree, this might just be a feature request to allow us to also require a11y labels when
Image(systemName:)
is used.The text was updated successfully, but these errors were encountered: