fix(hig): name the status icons that carry a result as a symbol alone - #2974
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-on to #2969. That one named controls; this one names state.
Eight status icons encode a result purely as a symbol plus a colour, with no text saying it. To VoiceOver they are silent, and to a colour-blind user two of them are the same glyph in two tints:
ConnectionImportPreviewList): ready / warning / unsupported..readydeliberately carries no message, so the green check was the only carrier;.warningsand.unsupportedTypeare the same triangle in yellow and orange.BrowsePluginsView,PluginRejectedBannerModifier): restart-to-activate versus installed.Each now carries an
.accessibilityLabel. Three of the strings already existed in the catalog (Warning,Failed,Done,Installed,Active); the rest are new keys and will read English until the next localization pass, which is how a new key behaves here.What I did not touch, and why it matters
The audit counted 128 unlabelled literal-symbol images. 81 have adjacent text in the same container and are correctly decorative. I did not add
.accessibilityHidden(true)to them, and checking them one by one is what stopped a regression:HistoryRowView.swift:70and:73look unlabelled for 60 lines in either direction. The label is applied at the call site (.accessibilityLabel(entry.wasSuccessful ? "Succeeded" : "Failed")). Hiding the icon would have deleted it.TableRowView.swift:108is already inside a row that combines its children and appends "pending delete" to the composed label.A blanket sweep would have hit both. The decorative class is real but it is polish, and the cost of getting one of them wrong is removing a control's only name, so it belongs in a change where each site is read.
Two more sites are genuinely meaning-bearing but cannot be fixed this way:
ResultSetMenu:39andAssistantPaneView:98are theicon:of a menu item'sLabel, and VoiceOver reads the enclosing Button's label, so an.accessibilityLabelon the image is inert. Fixing those means composing the state into the Button's own label, which needs new format strings; that is a separate change rather than a silent no-op here.Verification
swiftlint lint --strictover the five changed files: 0 violations.