-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Add support for setting the heading level for web semantics (#97894) #41435
base: main
Are you sure you want to change the base?
Conversation
The build is failing because some integration tests are failing in the framework side, I need to integrate both changes together (framework and engine part) for integration tests to pass. Please, someone can tell me how I should deal with this?. Maybe @yjbanov can shed some light? |
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
It's a tough one. We might have to temporarily disable the test, wait for the engine change to roll, then enable it again. |
Would you be willing to wait for #43159 to land before landing this PR? Currently |
Update: #43159 has landed. |
Here's what I'd recommend doing given the framework established in #43159.
Alternatively, we can give the task of setting Let's keep |
hi there is any progress with the last checks? |
Nice ideas!, thank you very much. I will create a Heading class extending RoleManager as you proposed. Sorry for my late response, I will try to implement it during this week. |
# Conflicts: # lib/ui/semantics.dart # lib/web_ui/lib/src/engine/semantics/label_and_value.dart # lib/web_ui/lib/src/engine/semantics/semantics.dart
label: 'Header of the page', | ||
transform: Matrix4.identity().toFloat64(), | ||
rect: const ui.Rect.fromLTRB(0, 0, 100, 50), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also test that we can update it and clear aria-level
when it's gone (assuming having the heading
role without aria-level
is a meaningful state).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @yjbanov, I'd say i's not a meaningful state, aria-level is required for "heading" role. Do you think I still should add it?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, if it's not an expected state, we don't need to test it.
Hi @victorgalo can you fix the ci so that we can merge this pr? |
auto label is removed for flutter/engine/41435, due to - The status or check suite Linux linux_web_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Hi @victorgalo there is some analyzer warning Analyzing web_ui... info - lib/src/engine/semantics/semantics.dart:1659:27 - This case is covered by the previous cases. Try removing the case clause, or restructuring the preceding patterns. - unreachable_switch_case 1 issue found. Since this have been open for a while, I can also take over if you want. let me know how you want to proceed |
auto label is removed for flutter/engine/41435, due to - The status or check suite Linux Web Framework tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Hi @chunhtai. Oh right, sorry I missed that warning after the rebase I did. Now it's fixed and I'm at the point where I was stuck, can you please help me understand why it's failing now?, I'd rather finish it myself but may need some guidance on this last step if you don't mind, sorry for the trouble! Thank you! |
Are we getting close here? I'd LOVE to get this landed. |
auto label is removed for flutter/engine/41435, due to - The status or check suite Linux Web Framework tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
auto label is removed for flutter/engine/41435, due to - The status or check suite Linux Web Framework tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
auto label is removed for flutter/engine/41435, due to - The status or check suite Linux Web Framework tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Hi @victorgalo
can you update the code? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ci failure is bury deep in the code, It took me a while to understand it is not a flaky infra. Sorry for the delay
@@ -823,6 +835,7 @@ abstract class SemanticsUpdateBuilder { | |||
required Int32List childrenInTraversalOrder, | |||
required Int32List childrenInHitTestOrder, | |||
required Int32List additionalActions, | |||
required int headingLevel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make this not required and give it a default value of 0
@@ -893,8 +906,13 @@ base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implem | |||
required Int32List childrenInTraversalOrder, | |||
required Int32List childrenInHitTestOrder, | |||
required Int32List additionalActions, | |||
required int headingLevel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -283,6 +283,7 @@ class SemanticsUpdateBuilder { | |||
required Int32List childrenInTraversalOrder, | |||
required Int32List childrenInHitTestOrder, | |||
required Int32List additionalActions, | |||
required int headingLevel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
This change adds a new property in Semantics widget that would take an integer value corresponding to the heading levels defined by the ARIA heading role. This is necessary in order to get proper accessibility and usability in a website for users who rely on screen readers and other assistive technologies.
Issue fixed by this PR:
flutter/flutter#97894
Framework part:
flutter/flutter#125771
Pre-launch Checklist
///
).