-
Notifications
You must be signed in to change notification settings - Fork 12
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
Accessible icons #8
Comments
This can easily (except for the
|
I added this feature in #10 |
Should the |
I will defer to @jooyoungseo's expertise on this. JooYoung, what is the right way for us to address accessibility concerns in these icon packages? |
|
I see some issues with fontawesome implementation in {shiny} and {fontawesome} packages. I will further investigate this issue. Using |
I think fontawesome's a11y recoomendation is debatable. they recommend using |
In the following example (retrieved from library(shiny)
ui <- fluidPage(
checkboxGroupInput("icons", "Choose icons:",
choiceNames =
list(icon("calendar"), icon("bed"),
icon("cog"), icon("bug")),
choiceValues =
list("calendar", "bed", "cog", "bug")
),
textOutput("txt")
)
server <- function(input, output, session) {
output$txt <- renderText({
icons <- paste(input$icons, collapse = ", ")
paste("You chose", icons)
})
}
shinyApp(ui, server) |
@jooyoungseo Thanks for these comments. To note, screen readers are not the target tools for If I summarise you suggest to:
Did I miss anything? @cscheid I can work on a PR if that's ok with you? |
Hum, in my first tests (Draft PR #12), MacOS screen reader seems to be unable to read the aria-label from the example below: |
@mcanouil -- Would you mind providing me with the example code in plain text? It's currently displayed in image. |
The following quarto/markdown: A text with a {{< fa folder >}} icon in it. produces the following HTML where MacOS screen reader omit the icon when reading: <p>A text with a <i class="fa-solid fa-folder" aria-label="folder"></i> icon in it.</p> This is the results of wip #12 |
I think we have this now, so I'm going to close it. |
I think accessibility is great.
Failing Elements: i.fa-solid.fa-file-pdf with the following html code <i class="fa-solid fa-file-pdf" aria-label="file-pdf"></i> |
I am not sure what it means exactly ... 🤔 Note that the aria-label here is the default that takes the icon label. |
FYI, automatic accessibility audit tools are only able to capture ~80% violation, and sometimes gives us an aggressive result. I don't think we have used any aria role particularly for fontawesome and the warning above can be disregarded. I used |
There are some recommendations at https://fontawesome.com/docs/web/dig-deeper/accessibility for accessibility of Font Awesome icons. Generally, they include adding
aria-hidden="true"
and adding atitle
for icons with semantic or iterative meaning. It would be good to incorporate these in the extension.The text was updated successfully, but these errors were encountered: