Construct
Construct copied to clipboard
Further improvement in CombatantRow's accessibility label.
After asking some advice in a Slack channel on using the legend, the expert advice was to attempt to ensure that the entire row is read as one sentence. For example;
"Mummy, HP: 64 of 58 including 8 temporary, AC: 11, Initiative modifier: -1"
I agree with this advice, though it has some implications;
- We should move the accessibility texts from the individual components to CombatantRow.
- Since the entire row would be one sentence, it can be considered to move the additional actions (
update HP
androll initiative
to the row's accessibilityActions.
That would be a bit of a change, so discussing this here first.
Thanks for looking into this; I agree the advice makes sense. That would lead to quite a few actions on the row:
- update hp
- roll initiative
- open combatant details screen
- open context menu for more/"secondary" actions (remove, duplicate, eliminate, etc.)
Is that a problem, should this be structured differently?
I don't think that looks like too much… it seems like four actions is the current maximum, so that is feasible. We could structure it as follows;
- Base action; Open stat block.
- Additional actions;
- Update HP
- Roll initiative
- Open context menu
So the default activate would open the stat block, and swiping up or down would rotate between that and the additional actions.
Sounds good.
I wonder if we need to manually combine all into a single element/sentence or if that is handled by the system if we use .accessibilityElement(children: .combine)