Kostia Sokolovskyi 243413f11b
Add role check in SemanticsNode._isDifferentFromCurrentSemanticAnnotation function. (#162578)
Fixes https://github.com/flutter/flutter/issues/162577

### Description
- Adds `role` check in
`SemanticsNode._isDifferentFromCurrentSemanticAnnotation` function.
- Adds `SemanticsNode.debugIsDirty` property to check in tests whether
the node is marked as dirty.

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.
2025-02-05 21:55:44 +00:00
..