Skip to content

fix: improve ListItem accessibility for title and description #4674

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/List/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ const ListItem = (
})
: null}
<View
accessible={true}
style={[
theme.isV3 ? styles.itemV3 : styles.item,
styles.content,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ exports[`renders expanded accordion 1`] = `
}
>
<View
accessible={true}
style={
[
{
Expand Down
7 changes: 7 additions & 0 deletions src/components/__tests__/__snapshots__/ListItem.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ exports[`renders list item with custom description 1`] = `
}
>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -382,6 +383,7 @@ exports[`renders list item with custom title and description styles 1`] = `
}
>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -527,6 +529,7 @@ exports[`renders list item with left and right items 1`] = `
GG
</Text>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -772,6 +775,7 @@ exports[`renders list item with left item 1`] = `
</Text>
</View>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -878,6 +882,7 @@ exports[`renders list item with right item 1`] = `
}
>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -987,6 +992,7 @@ exports[`renders list item with title and description 1`] = `
}
>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -1125,6 +1131,7 @@ exports[`renders with a description with typeof number 1`] = `
}
>
<View
accessible={true}
style={
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ exports[`renders list section with custom title style 1`] = `
</Text>
</View>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -483,6 +484,7 @@ exports[`renders list section with custom title style 1`] = `
</Text>
</View>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -859,6 +861,7 @@ exports[`renders list section with subheader 1`] = `
</Text>
</View>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -1016,6 +1019,7 @@ exports[`renders list section with subheader 1`] = `
</Text>
</View>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -1352,6 +1356,7 @@ exports[`renders list section without subheader 1`] = `
</Text>
</View>
<View
accessible={true}
style={
[
{
Expand Down Expand Up @@ -1509,6 +1514,7 @@ exports[`renders list section without subheader 1`] = `
</Text>
</View>
<View
accessible={true}
style={
[
{
Expand Down