Add default outline for a11y

pull/6494/head
Cagatay Civici 2024-09-29 00:49:17 +03:00
parent 80b1f0210c
commit 053cdfbb18
7 changed files with 34 additions and 27 deletions

View File

@ -21,9 +21,9 @@ const theme = ({ dt }) => `
}
.p-rating-option.p-focus-visible {
box-shadow: ${dt('focus.ring.shadow')};
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
outline-offset: ${dt('focus.ring.offset')};
box-shadow: ${dt('rating.focus.ring.shadow')};
outline: ${dt('rating.focus.ring.width')} ${dt('rating.focus.ring.style')} ${dt('rating.focus.ring.color')};
outline-offset: ${dt('rating.focus.ring.offset')};
}
.p-rating-icon {

View File

@ -34,9 +34,9 @@ export default {
semantic: {
transitionDuration: '0.2s',
focusRing: {
width: '0',
style: 'none',
color: 'transparent',
width: '2px',
style: 'solid',
color: '{primary.color}',
offset: '0',
shadow: 'none'
},

View File

@ -15,11 +15,11 @@ export default {
invalidBorderColor: '{form.field.invalid.border.color}',
shadow: '{form.field.shadow}',
focusRing: {
width: '{focus.ring.width}',
style: '{focus.ring.style}',
color: '{focus.ring.color}',
offset: '{focus.ring.offset}',
shadow: '{focus.ring.shadow}'
width: '0',
style: 'none',
color: 'unset',
offset: '0',
shadow: 'none'
},
transitionDuration: '{form.field.transition.duration}'
},

View File

@ -14,11 +14,11 @@ export default {
invalidBorderColor: '{form.field.invalid.border.color}',
shadow: '{form.field.shadow}',
focusRing: {
width: '{focus.ring.width}',
style: '{focus.ring.style}',
color: '{focus.ring.color}',
offset: '{focus.ring.offset}',
shadow: '{focus.ring.shadow}'
width: '0',
style: 'none',
color: 'unset',
offset: '0',
shadow: 'none'
},
transitionDuration: '{form.field.transition.duration}'
},

View File

@ -1,7 +1,14 @@
export default {
root: {
gap: '0.5rem',
transitionDuration: '{transition.duration}'
transitionDuration: '{transition.duration}',
focusRing: {
width: '0',
style: 'none',
color: 'unset',
offset: '0',
shadow: 'none'
}
},
icon: {
size: '1.125rem',

View File

@ -25,11 +25,11 @@ export default {
shadow: '0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12)'
},
focusRing: {
width: '{focus.ring.width}',
style: '{focus.ring.style}',
color: '{focus.ring.color}',
offset: '{focus.ring.offset}',
shadow: '{focus.ring.shadow}'
width: '0',
style: 'none',
color: 'unset',
offset: '0',
shadow: 'none'
}
},
style: ({ dt }) => `

View File

@ -6,11 +6,11 @@ export default {
gap: '0',
shadow: 'none',
focusRing: {
width: '{focus.ring.width}',
style: '{focus.ring.style}',
color: '{focus.ring.color}',
offset: '{focus.ring.offset}',
shadow: '{focus.ring.shadow}'
width: '0',
style: 'none',
color: 'unset',
offset: '0',
shadow: 'none'
},
borderWidth: '1px',
borderColor: 'transparent',