Skip to content

[a11y] 11.1.3.1a Info and relationships - #4448

Merged
Aitorbp merged 10 commits into
masterfrom
feature/info_and_relationships_headings
Aug 13, 2024
Merged

Aitorbp merged 10 commits into
masterfrom
feature/info_and_relationships_headings

Conversation

@Aitorbp

@Aitorbp Aitorbp commented Aug 7, 2024 •

Copy link
Copy Markdown
Contributor

Related Issues

App:

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

QA

Review: #4448 (comment)

Reports:

@Aitorbp Aitorbp self-assigned this Aug 7, 2024
@Aitorbp Aitorbp linked an issue Aug 7, 2024 that may be closed by this pull request
5 tasks done
@Aitorbp

Aitorbp commented Aug 7, 2024

Copy link
Copy Markdown
Contributor Author

In this pull request, we will choose to use the android:accessibilityHeading element in the xml to tell the Talkback that we are dealing with a Heading, that is, that they are not elements that have an assigned action, but rather their function is to summarize groups of text that appear on the screen. Below is some documentation offered by Android on this topic: https://developer.android.com/guide/topics/ui/accessibility/principles#headings_within_text

Just for you to know, we should avoid to use adding a contentDescription to the elements because the word heading must not appear on the screen. This is anti-pattern behavior.

There is a corner case where android:accessibilityHeading is not working as usual. It is the toolbar in share view. For this attribute to work we need to add the attributes android:focusable="true" and android:focusableInTouchMode="false". These attributes are needed to:

  • Make the Toolbar recognizable and focusable by accessibility services.
  • Ensure that it does not interfere with the normal touch interaction of the user.

A little more theory about these two attributes:
android:focusable="true" says that this view should be focusable, while android:focusableInTouchMode="false" makes it so it’s not focusable in touch mode. This means you can focus it when using a screen reader, but not otherwise by touch. You do this because this parent view isn’t clickable.

As for the file name of the image viewer, it is not going to be labeled as a heading, because we consider it to be a specific element within the toolbar and there are a lot of elements in that view (five exactly). The same occurs with the name of the Spaces, when clicking on it a SearchView opens. The Search view could be changed to only open by clicking the search view icon, but that is outside the scope of the issue. Therefore, it will not be changed either.

@Aitorbp

Aitorbp commented Aug 7, 2024

Copy link
Copy Markdown
Contributor Author

In this pull request also we have fixed the following issues:
#4363: Used the attribute labelFor to link the elements
#4371: Changed the name of contentDescription

@Aitorbp Aitorbp linked an issue Aug 7, 2024 that may be closed by this pull request
1 task done
@jabarros

jabarros commented Aug 8, 2024

Copy link
Copy Markdown
Contributor

LGTM

Comment thread changelog/unreleased/4448 Resolved
@jesmrec

jesmrec commented Aug 9, 2024 •

Copy link
Copy Markdown
Member

#4371

  • The "Cancel" and "Save" buttons have visual labels that are not included in the accessible name. Instead, variable names appear to be used as accessible names.

Fixed

#4362

Shares

  • There are several visually clearly recognizable headings on the page, but they are not
    labeled as such. These headings include "Sharing", "Users
    and groups" and "Public links".

Fixed

Edit shared link

  • There is a clearly visually recognizable heading on the page "Edit shared link
    Edit shared link" on the page, but it has not been labeled as such.

Fixed

Spaces

  • There is a clearly visually recognizable heading "Spaces" on the page, but it has not been
    not labeled as such.

Note: The heading "Spaces" also functions as a button, but this is not visually recognizable.
visually recognizable. It would be better to provide a separate button for editing

TODO in #4452

Manage accounts

  • There is a clearly visually recognizable heading "Manage accounts" on the page, which
    not labeled as such.

Fixed

Image Viewer

  • The file name could be labeled as a heading.
    WONT FIX: after checking other apps in Google ecosystem, titles in same situation are not labelled as headings. We'll follow that rule and will not label that.

#4363

Edit shared link

  • Neither the input field nor the two switches are programmatically linked to the corresponding labels.
    linked to the corresponding labels. When operating with swipe gestures
    and activated screen reader, form elements and labels should ideally only
    should ideally only represent one focus point. The screen reader would then
    automatically read out the associated caption when the form element is focused
    which should either be highlighted or linked.

Fixed. Now, dictation tells which element the switch is attached to.

@jesmrec

jesmrec commented Aug 9, 2024 •

Copy link
Copy Markdown
Member

(1) [FIXED]

A pretty simple fix, out of the scope indeed.

Opening the "Manage accounts" view, the X button appears as "unlabelled". That element is a new one from latest sprints, so, the problem wasn't reported because it didn't exist in that moment.

@jesmrec

jesmrec commented Aug 9, 2024 •

Copy link
Copy Markdown
Member

(2) [FIXED]

Just a question:

When selecting any item in the public list or in the share with users and groups list, the dictation tells the name correctly, but finishes with Double tap and hold to long press. Long press is not available for those items, unlike to the items in the file list that can be long-pressed.

@Aitorbp
Aitorbp force-pushed the feature/info_and_relationships_headings branch 2 times, most recently from fb41857 to 4c6aec1 Compare August 9, 2024 11:07
@Aitorbp

Aitorbp commented Aug 9, 2024 •

Copy link
Copy Markdown
Contributor Author

(2) Ready to text @jesmrec

Just a question:

When selecting any item in the public list or in the share with users and groups list, the dictation tells the name correctly, but finishes with Double tap and hold to long press. Long press is not available for those items, unlike to the items in the file list that can be long-pressed.

To resolve this we have deleted the longClickable attribute in the corresponding classes, so the talkback won't tell us the next sentence: Double tap and hold to long press

@Aitorbp
Aitorbp force-pushed the feature/info_and_relationships_headings branch 2 times, most recently from ef9afe3 to 8639716 Compare August 9, 2024 11:53
@jesmrec

jesmrec commented Aug 12, 2024

Copy link
Copy Markdown
Member

There is a clearly visually recognizable heading "Spaces" on the page, but it has not been
not labeled as such.
Note: The heading "Spaces" also functions as a button, but this is not visually recognizable.
visually recognizable. It would be better to provide a separate button for editing

That needs an extra work and research beyond accessibility. The way to open the search bar should be only the lens icon, not the whole cell. The point is, whether it will turn the text into a heading, as @Aitorbp states here. Same for the images preview

@jesmrec

jesmrec commented Aug 12, 2024

Copy link
Copy Markdown
Member

@TheOneRing @tbsbdr should the name of the file be handled as a heading in this case?:

Screenshot 2024-08-12 at 09 18 31

It seems to, but, it's on the top together with other icons/options in the same hierarchy level. So, it's not totally clear for us. Any ideas?

@TheOneRing

Copy link
Copy Markdown

An alternative approach would be a subtitle, but please compare with other android apps.

@Aitorbp

Aitorbp commented Aug 12, 2024 •

Copy link
Copy Markdown
Contributor Author

@TheOneRing @tbsbdr should the name of the file be handled as a heading in this case?:

Screenshot 2024-08-12 at 09 18 31

It seems to, but, it's on the top together with other icons/options in the same hierarchy level. So, it's not totally clear for us. Any ideas?

For example, in the Google Drive application, talkback does not detect the title of the text on the image detail screen as a heading, it simply reads the content of the title.

drive_title_detail_view_talkback_example

The same happens here with Dropbox application:

dropbox_title_detail_view_talkback_example

So, in other applications, the title of the detail view is not set as heading, since it is only the file title, having more elements in the same hierarchy of the toolbar, that's why I think it is not appropriate to put the title as heading. If the selection were made on the entire toolbar, I would think it would be more correct to set that element as heading, but that is not the case. Therefore, it will be left as it is currently.

@Aitorbp

Aitorbp commented Aug 13, 2024

Copy link
Copy Markdown
Contributor Author

There is a clearly visually recognizable heading "Spaces" on the page, but it has not been
not labeled as such.
Note: The heading "Spaces" also functions as a button, but this is not visually recognizable.
visually recognizable. It would be better to provide a separate button for editing

That needs an extra work and research beyond accessibility. The way to open the search bar should be only the lens icon, not the whole cell. The point is, whether it will turn the text into a heading, as @Aitorbp states here. Same for the images preview

This report will be further worked on in the following issue: #4452

@jesmrec
jesmrec self-requested a review August 13, 2024 10:38
@jesmrec

jesmrec commented Aug 13, 2024

Copy link
Copy Markdown
Member

All reports are correctly fixed, explained or moved to other issues. Let's move this one forward and iterate over it.

@Aitorbp
Aitorbp force-pushed the feature/info_and_relationships_headings branch from 2063c78 to c36ae40 Compare August 13, 2024 11:56
@Aitorbp Aitorbp mentioned this pull request Aug 13, 2024
11 tasks done
@Aitorbp
Aitorbp merged commit dd25e8b into master Aug 13, 2024
@Aitorbp
Aitorbp deleted the feature/info_and_relationships_headings branch August 13, 2024 12:41
@jesmrec jesmrec mentioned this pull request Aug 21, 2024
8 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[a11y] 11.2.5.3 Label in the name [a11y] 11.1.3.1d Info and relationships (form elements) [a11y] 11.1.3.1a Info and relationships (headings)

4 participants