add note about Region.description

This commit is contained in:
mdgriffith 2020-05-25 18:58:09 -04:00
parent 4d624f2395
commit 658464f215
2 changed files with 7 additions and 1 deletions

View File

@ -330,6 +330,8 @@ The `onPress` handler will be fired either `onClick` or when the element is focu
, label = text "My Button"
}
**Note** If you have an icon button but want it to be accessible, consider adding a [`Region.description`](Element-Region#description), which will describe the button to screen readers.
-}
button :
List (Attribute msg)

View File

@ -101,7 +101,11 @@ announce =
Internal.Describe LivePolite
{-| -}
{-| Adds an `aria-label`, which is used by accessibility software to identity otherwise unlabeled elements.
A common use for this would be to label buttons that only have an icon.
-}
description : String -> Attribute msg
description =
Internal.Describe << Internal.Label