[Accessibility] Semantics `header` property is ignored on Android
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
1. Create a text view, marked as header:
```dart
Semantics(
header: true,
child: Text('Descriptive header')
);
```
2. Install on Android device
3. Navigate to the text view using TalkBack
This commit: https://github.com/flutter/flutter/commit/59d8010db5139da19b265c3f7cf29f90a86b8e5e has changed the logic for setting the `isHeading` property.
`result.setHeading(semanticsNode.hasFlag(Flag.IS_HEADER));` was replaced by `result.setHeading(semanticsNode.headingLevel > 0);` without a fallback.
Expected behavior would be to set `isHeading` to true if `Flag.IS_HEADER` OR `headingLevel > 0`.
### Expected results
TalkBack should announce the text view as header.
### Actual results
TalkBack does not announce is header.
### Code sample
```dart
Semantics(
header: true,
child: Text('Descriptive header')
);
```
### Screenshots or Video
The `isHeading` property is false in the accessibility tree.
### Logs
N/A
### Flutter Doctor output
N/A
Contributor guide
Assessment
This issue has not been assessed yet.