chore(a11y): improve component roles

This commit is contained in:
liyasthomas
2022-03-01 12:11:53 +05:30
parent b3d0d4d86b
commit 9bd55b6db5
39 changed files with 498 additions and 420 deletions

View File

@@ -28,6 +28,7 @@ const SmartLink = {
switch (tag) {
case ANCHOR_TAG:
attrs["aria-label"] = "Link"
attrs.role = "link"
// Map `to` prop to the correct attribute
attrs.href = context.props.to
@@ -56,6 +57,7 @@ const SmartLink = {
default:
attrs["aria-label"] = "Button"
attrs.role = "button"
break
}