Repository navigation
Outline item action buttons in orange and put icons on common verbs - #169
Merged
Merged
Conversation
Item action buttons were white text on bright green (1.74:1). They are now an orange outline that fills on hover and press, so an item with many verbs is not a wall of colour. --color-text-button was used but never defined, so it fell back to white. It is now the dark inverse text colour, which also makes the player card buttons readable. ItemAction carries the bare verb name so ItemCard can pick an icon for the verbs it knows; the icon sits beside the label and is hidden from assistive tech.
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.
Kael asked for the item action buttons to look more like actions, suggested orange, and asked about icons.
What changes
ItemActionnow carries the bare verb name, andItemCardshows an icon beside the label for sit, lie, take, remove, put, open, close, give, drop, bolt and unbolt. Other verbs stay text-only. The icon isaria-hidden; the button's accessible name is unchanged.--color-text-buttonwas used by the item and player card buttons but never defined, so it fell back to white on bright fills (1.74:1 on the old green item buttons). It is now defined as the dark inverse text colour. This also changes the player card's Page / Say To / Look / Follow text from white to dark (1.67–2.72:1 before, 6.7–11:1 now); their fills are unchanged.Contrast
Checked
vitest run src/itemActions.test.ts src/components/ItemCard.test.tsx: 8 passed, including a new test that a known verb gets a hidden icon and an unknown one gets none.tsc --noEmitclean.Not checked