Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for locked and inactive disabled buttons to be visually different #485

Closed
kirsty-hames opened this issue Jan 22, 2024 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@kirsty-hames
Copy link
Contributor

kirsty-hames commented Jan 22, 2024

Subject of the enhancement

Depending on the button context, the appropriate .is-locked or .is-disabled classes should be used. This doesn't have any impact on the functionality as all disabled buttons have the attribute aria-disabled. .is-locked or .is-disabled should only be used to apply styles.

Expected behaviour

.is-locked - applies to buttons that are temporarily disabled due to step locked content.
Instances include: Boxmenu item button, Trickle button and PLP.

.is-disabled - applies to buttons with functionality not available.
Instances include: Narrative start/end controls, Submit button when no answers have been selected, Feedback button when question hasn't been submitted.

Plugins with locked states

Boxmenu

Already has .is-locked class. Nothing to action.

pageLevelProgressItem

Replace .is-disabled with .is-locked. This would be consistent with the locked aria-label.

plp

.is-locked style would need adding to Vanilla.

Trickle

Issue already raised adaptlearning/adapt-contrib-trickle#208. Locked styling would also be consistent with the aria-label.

trickle

There are no specific Trickle button styles currently. Colours inherit from Vanilla .btn-text instead which already includes .is-locked.

@kirsty-hames
Copy link
Contributor Author

Issue fixed by the following:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant