fix(button): increase click area to meet WCAG success criteria
This commit is contained in:
parent
1340c1bd61
commit
be84466311
3 changed files with 10 additions and 4 deletions
5
.changeset/lemon-ravens-mate.md
Normal file
5
.changeset/lemon-ravens-mate.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@lion/button': patch
|
||||
---
|
||||
|
||||
Increase minimum click area to meet WCAG Success Criterion 2.5.5 Target Size (Enhanced)
|
||||
|
|
@ -23,6 +23,8 @@ export const disabled = () => html`<lion-button disabled>Disabled</lion-button>`
|
|||
|
||||
## Minimum click area
|
||||
|
||||
The minimum click area needs to be at least `44px` by `44px` according to [WCAG Success Criterion 2.5.5 Target Size (Enhanced)](https://www.w3.org/TR/WCAG22/#target-size-enhanced).
|
||||
|
||||
```js preview-story
|
||||
export const minimumClickArea = () => html` <style>
|
||||
.small {
|
||||
|
|
|
|||
|
|
@ -67,10 +67,9 @@ export class LionButton extends DisabledWithTabIndexMixin(LitElement) {
|
|||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
/* touch area (comes into play when button height goes below this one) */
|
||||
/* src = https://www.smashingmagazine.com/2012/02/finger-friendly-design-ideal-mobile-touchscreen-target-sizes/ */
|
||||
min-height: 40px;
|
||||
min-width: 40px;
|
||||
/* Minimum click area to meet [WCAG Success Criterion 2.5.5 Target Size (Enhanced)](https://www.w3.org/TR/WCAG22/#target-size-enhanced) */
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue