material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.38k stars 3.07k forks source link

[MaterialToolbar] Title not marked as heading for accessibility #4073

Open albertvaka opened 8 months ago

albertvaka commented 8 months ago

Expected behavior: The title TextView of the toolbar should be marked as a heading so screen readers describe it as so.

Source code:

Android API version: Any

Material Library version: Any

Device: Any

albertvaka commented 8 months ago

Note: Apparently there's way different from headings [1] to designate titles [2] which we should use instead.

[1] https://www.w3.org/WAI/WCAG21/Understanding/section-headings.html [2] https://www.w3.org/WAI/WCAG21/Understanding/page-titled