Skip to content
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

Merged
merged 65 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
a341b26
Add support for setting the heading level for web semantics (#97894)
victorgalo Apr 23, 2023
eff0206
Add support for setting the heading level for web semantics (#97894)
victorgalo Apr 24, 2023
7f8ef2c
Merge branch 'main' into add-semantics-heading-level
victorgalo Apr 24, 2023
9029d63
Add support for setting the heading level for web semantics (#97894)
victorgalo Apr 24, 2023
260d4bd
Add support for setting the heading level for web semantics (#97894)
victorgalo Apr 30, 2023
baea4c1
Merge branch 'main' into add-semantics-heading-level
victorgalo Apr 30, 2023
bf0fe7f
Merge branch 'main' into add-semantics-heading-level
victorgalo Sep 9, 2023
b773f81
Merge branch 'main' into add-semantics-heading-level
victorgalo Sep 9, 2023
90de9fc
Remove trailing spaces
victorgalo Sep 9, 2023
c9ac350
Merge branch 'main' into add-semantics-heading-level
victorgalo Sep 9, 2023
c8ccd31
Add export for new Heading role
victorgalo Sep 9, 2023
0241f07
Fix references for new Heading role
victorgalo Sep 10, 2023
6298a5f
Remove unused import
victorgalo Sep 10, 2023
36c5fd6
Fix PR comments (41435)
victorgalo Sep 19, 2023
30153e0
Remove trailing whitespace
victorgalo Sep 19, 2023
5460388
Add support for setting the heading level for web semantics (#97894)
victorgalo Sep 20, 2023
a526070
Add support for setting the heading level for web semantics (#97894)
victorgalo Sep 20, 2023
dceef3c
Add support for setting the heading level for web semantics (#97894)
victorgalo Sep 21, 2023
3a6e45d
Add support for setting the heading level for web semantics (#97894)
victorgalo Sep 24, 2023
b9bfb88
Add support for setting the heading level for web semantics (#97894)
victorgalo Sep 24, 2023
664c1e4
Change headingLevel to not be nullable
victorgalo Nov 12, 2023
e6a8c6a
Merge branch 'main' into add-semantics-heading-level
victorgalo Nov 12, 2023
470f67f
Change headingLevel to be non nullable
victorgalo Nov 12, 2023
a56c398
Change headingLevel to be non nullable
victorgalo Nov 12, 2023
b31bd9f
Change headingLevel to be non nullable
victorgalo Nov 12, 2023
8305e4b
Change headingLevel to be non nullable
victorgalo Nov 12, 2023
d860f21
Make headingLevel temporarily optional until framework part is uploaded
victorgalo Nov 13, 2023
a16a8f7
Merge branch 'main' into add-semantics-heading-level
victorgalo Nov 13, 2023
70efe89
Merge branch 'main' into add-semantics-heading-level
victorgalo Dec 2, 2023
ddeaefc
Change headingLevel to be non nullable
victorgalo Dec 4, 2023
bcd3205
remove trailing whitespaces
victorgalo Dec 4, 2023
9d25b32
Merge branch 'main' into add-semantics-heading-level
victorgalo Dec 4, 2023
268e31c
Change default value for headingLevel to 0
victorgalo Jan 19, 2024
a7bb630
Merge branch 'main' into add-semantics-heading-level
victorgalo Jan 19, 2024
0f72806
Change default value for headingLevel to 0
victorgalo Jan 21, 2024
79e4728
Add focusAsRouteDefault implementation to Heading primary role
victorgalo Jan 21, 2024
4b69d9f
Change default value for headingLevel to 0
victorgalo Jan 21, 2024
c83039b
Merge branch 'main' into add-semantics-heading-level
victorgalo Feb 11, 2024
b351c1e
Merge branch 'main' into add-semantics-heading-level
victorgalo Mar 13, 2024
5705912
Fix unit test for semantics heading level attribute
victorgalo Mar 13, 2024
89ef536
Merge branch 'main' into add-semantics-heading-level
victorgalo Mar 14, 2024
e60c0a7
Change constructor for Heading role
victorgalo Mar 14, 2024
bb787e0
Fix unit test for semantics heading level
victorgalo Mar 15, 2024
7199da1
Merge branch 'main' into add-semantics-heading-level
victorgalo Mar 15, 2024
76b65f6
Merge branch 'main' into add-semantics-heading-level
victorgalo Mar 15, 2024
ee38434
Merge branch 'main' into add-semantics-heading-level
victorgalo Mar 18, 2024
41f77aa
Merge branch 'main' into add-semantics-heading-level
victorgalo Mar 29, 2024
e38e3f3
Fix PR comments (41435)
victorgalo Sep 19, 2023
1e570fb
Change headingLevel to not be nullable
victorgalo Nov 12, 2023
ac1ec5e
Change default value for headingLevel to 0
victorgalo Jan 19, 2024
0b9efa6
Remove duplicated definition after fixing rebase conflicts
victorgalo Mar 29, 2024
4a54812
Merge branch 'main' into add-semantics-heading-level
victorgalo May 10, 2024
6d8d511
Remove unnecessary check for Heading primary role
victorgalo May 10, 2024
2586dbc
Merge branch 'main' into add-semantics-heading-level
victorgalo May 12, 2024
fc0a3a5
Merge branch 'main' into add-semantics-heading-level
chunhtai May 16, 2024
ca2d289
Remove duplicated case in switch statement
victorgalo May 17, 2024
5e05f24
Merge branch 'main' into add-semantics-heading-level
victorgalo May 17, 2024
9231840
Merge branch 'main' into add-semantics-heading-level
victorgalo May 17, 2024
c52b545
Merge branch 'main' into add-semantics-heading-level
victorgalo May 17, 2024
33a246c
Merge branch 'main' into add-semantics-heading-level
victorgalo May 18, 2024
1b0e241
Merge branch 'main' into add-semantics-heading-level
chunhtai May 29, 2024
e918e20
Merge branch 'main' into add-semantics-heading-level
victorgalo Jun 1, 2024
4383464
Change semantics headingLevel attribute to be not required until fram…
victorgalo Jun 1, 2024
5186055
fix lint
chunhtai Jun 4, 2024
af5e70a
Merge branch 'main' into add-semantics-heading-level
chunhtai Jun 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -43350,6 +43350,7 @@ ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/accessibility.dart
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/checkable.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/dialog.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/focusable.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/heading.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/image.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/incrementable.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/label_and_value.dart + ../../../flutter/LICENSE
Expand Down Expand Up @@ -46224,6 +46225,7 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/accessibility.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/checkable.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/dialog.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/focusable.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/heading.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/image.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/incrementable.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/label_and_value.dart
Expand Down
4 changes: 3 additions & 1 deletion lib/ui/fixtures/ui_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ void sendSemanticsUpdate() {
transform: transform,
childrenInTraversalOrder: childrenInTraversalOrder,
childrenInHitTestOrder: childrenInHitTestOrder,
additionalActions: additionalActions);
additionalActions: additionalActions,
headingLevel: 0,
);
_semanticsUpdate(builder.build());
}

Expand Down
25 changes: 23 additions & 2 deletions lib/ui/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,18 @@ abstract class SemanticsUpdateBuilder {
/// z-direction starting at `elevation`. Basically, in the z-direction the
/// node starts at `elevation` above the parent and ends at `elevation` +
/// `thickness` above the parent.
///
/// The `headingLevel` describes that this node is a heading and the hierarchy
/// level this node represents as a heading. A value of 0 indicates that this
/// node is not a heading. A value of 1 or greater indicates that this node is
/// a heading at the specified level. The valid value range is from 1 to 6,
/// inclusive. This attribute is only used for Web platform, and it will have
/// no effect on other platforms.
///
/// See also:
///
/// * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/heading_role
/// * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-level
void updateNode({
required int id,
required int flags,
Expand Down Expand Up @@ -823,6 +835,7 @@ abstract class SemanticsUpdateBuilder {
required Int32List childrenInTraversalOrder,
required Int32List childrenInHitTestOrder,
required Int32List additionalActions,
required int headingLevel,
Copy link
Contributor

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

});

/// Update the custom semantics action associated with the given `id`.
Expand Down Expand Up @@ -893,8 +906,13 @@ base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implem
required Int32List childrenInTraversalOrder,
required Int32List childrenInHitTestOrder,
required Int32List additionalActions,
required int headingLevel,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

}) {
assert(_matrix4IsValid(transform));
assert (
headingLevel >= 0 && headingLevel <= 6,
'Heading level must be between 1 and 6, or 0 to indicate that this node is not a heading.'
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also want to assert(headingLevel >= -1)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right!, done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably can't be 0 as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done

_updateNode(
id,
flags,
Expand Down Expand Up @@ -932,6 +950,7 @@ base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implem
childrenInTraversalOrder,
childrenInHitTestOrder,
additionalActions,
headingLevel,
);
}
@Native<
Expand Down Expand Up @@ -972,7 +991,8 @@ base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implem
Handle,
Handle,
Handle,
Handle)>(symbol: 'SemanticsUpdateBuilder::updateNode')
Handle,
Int32)>(symbol: 'SemanticsUpdateBuilder::updateNode')
external void _updateNode(
int id,
int flags,
Expand Down Expand Up @@ -1009,7 +1029,8 @@ base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implem
Float64List transform,
Int32List childrenInTraversalOrder,
Int32List childrenInHitTestOrder,
Int32List additionalActions);
Int32List additionalActions,
int headingLevel);

@override
void updateCustomAction({required int id, String? label, String? hint, int overrideId = -1}) {
Expand Down
1 change: 1 addition & 0 deletions lib/ui/semantics/semantics_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ struct SemanticsNode {
std::vector<int32_t> childrenInTraversalOrder;
std::vector<int32_t> childrenInHitTestOrder;
std::vector<int32_t> customAccessibilityActions;
int32_t headingLevel = 0;
};

// Contains semantic nodes that need to be updated.
Expand Down
5 changes: 4 additions & 1 deletion lib/ui/semantics/semantics_update_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ void SemanticsUpdateBuilder::updateNode(
const tonic::Float64List& transform,
const tonic::Int32List& childrenInTraversalOrder,
const tonic::Int32List& childrenInHitTestOrder,
const tonic::Int32List& localContextActions) {
const tonic::Int32List& localContextActions,
int headingLevel) {
FML_CHECK(scrollChildren == 0 ||
(scrollChildren > 0 && childrenInHitTestOrder.data()))
<< "Semantics update contained scrollChildren but did not have "
Expand Down Expand Up @@ -118,6 +119,8 @@ void SemanticsUpdateBuilder::updateNode(
localContextActions.data(),
localContextActions.data() + localContextActions.num_elements());
nodes_[id] = node;

node.headingLevel = headingLevel;
}

void SemanticsUpdateBuilder::updateCustomAction(int id,
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/semantics/semantics_update_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class SemanticsUpdateBuilder
const tonic::Float64List& transform,
const tonic::Int32List& childrenInTraversalOrder,
const tonic::Int32List& childrenInHitTestOrder,
const tonic::Int32List& customAccessibilityActions);
const tonic::Int32List& customAccessibilityActions,
int headingLevel);

void updateCustomAction(int id,
std::string label,
Expand Down
2 changes: 2 additions & 0 deletions lib/web_ui/lib/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ class SemanticsUpdateBuilder {
required Int32List childrenInTraversalOrder,
required Int32List childrenInHitTestOrder,
required Int32List additionalActions,
required int headingLevel,
kevmoo marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

}) {
if (transform.length != 16) {
throw ArgumentError('transform argument must have 16 entries.');
Expand Down Expand Up @@ -321,6 +322,7 @@ class SemanticsUpdateBuilder {
childrenInHitTestOrder: childrenInHitTestOrder,
additionalActions: additionalActions,
platformViewId: platformViewId,
headingLevel: headingLevel,
));
}

Expand Down
1 change: 1 addition & 0 deletions lib/web_ui/lib/src/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export 'engine/semantics/accessibility.dart';
export 'engine/semantics/checkable.dart';
export 'engine/semantics/dialog.dart';
export 'engine/semantics/focusable.dart';
export 'engine/semantics/heading.dart';
export 'engine/semantics/image.dart';
export 'engine/semantics/incrementable.dart';
export 'engine/semantics/label_and_value.dart';
Expand Down
1 change: 1 addition & 0 deletions lib/web_ui/lib/src/engine/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
export 'semantics/accessibility.dart';
export 'semantics/checkable.dart';
export 'semantics/focusable.dart';
export 'semantics/heading.dart';
export 'semantics/image.dart';
export 'semantics/incrementable.dart';
export 'semantics/label_and_value.dart';
Expand Down
37 changes: 37 additions & 0 deletions lib/web_ui/lib/src/engine/semantics/heading.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import '../dom.dart';
import 'semantics.dart';

/// Renders semantics objects as headings with the corresponding
/// level (h1 ... h6).
class Heading extends PrimaryRoleManager {
Heading(SemanticsObject semanticsObject)
: super.blank(PrimaryRole.heading, semanticsObject) {
addHeadingRole();
}

@override
void update() {
super.update();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can return early if the heading level field is not dirty.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I added it.


if (!semanticsObject.isHeadingLevelDirty) {
return;
}

addHeadingLevel(semanticsObject.headingLevel);
}

@override
bool focusAsRouteDefault() => focusable?.focusAsRouteDefault() ?? false;

void addHeadingRole() {
setAriaRole('heading');
}

void addHeadingLevel(int headingLevel) {
semanticsObject.element.setAttribute('aria-level', headingLevel);
}
}
33 changes: 33 additions & 0 deletions lib/web_ui/lib/src/engine/semantics/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import 'accessibility.dart';
import 'checkable.dart';
import 'dialog.dart';
import 'focusable.dart';
import 'heading.dart';
import 'image.dart';
import 'incrementable.dart';
import 'label_and_value.dart';
Expand Down Expand Up @@ -232,6 +233,7 @@ class SemanticsNodeUpdate {
required this.childrenInTraversalOrder,
required this.childrenInHitTestOrder,
required this.additionalActions,
required this.headingLevel,
});

/// See [ui.SemanticsUpdateBuilder.updateNode].
Expand Down Expand Up @@ -332,6 +334,9 @@ class SemanticsNodeUpdate {

/// See [ui.SemanticsUpdateBuilder.updateNode].
final double thickness;

/// See [ui.SemanticsUpdateBuilder.updateNode].
final int headingLevel;
}

/// Identifies [PrimaryRoleManager] implementations.
Expand All @@ -354,6 +359,10 @@ enum PrimaryRole {
/// A control that has a checked state, such as a check box or a radio button.
checkable,

/// Adds the "heading" ARIA role to the node. The attribute "aria-level" is
/// also assigned.
heading,

/// Visual only element.
image,

Expand Down Expand Up @@ -1097,6 +1106,19 @@ class SemanticsObject {
_dirtyFields |= _platformViewIdIndex;
}

/// See [ui.SemanticsUpdateBuilder.updateNode].
int get headingLevel => _headingLevel;
int _headingLevel = 0;

static const int _headingLevelIndex = 1 << 24;

/// Whether the [headingLevel] field has been updated but has not been
/// applied to the DOM yet.
bool get isHeadingLevelDirty => _isDirty(_headingLevelIndex);
void _markHeadingLevelDirty() {
_dirtyFields |= _headingLevelIndex;
}

/// A unique permanent identifier of the semantics node in the tree.
final int id;

Expand Down Expand Up @@ -1201,6 +1223,9 @@ class SemanticsObject {
/// Whether this object represents an editable text field.
bool get isTextField => hasFlag(ui.SemanticsFlag.isTextField);

/// Whether this object represents a heading element.
bool get isHeading => headingLevel != 0;

/// Whether this object represents an editable text field.
bool get isLink => hasFlag(ui.SemanticsFlag.isLink);

Expand Down Expand Up @@ -1358,6 +1383,11 @@ class SemanticsObject {
_markTooltipDirty();
}

if (_headingLevel != update.headingLevel) {
_headingLevel = update.headingLevel;
_markHeadingLevelDirty();
}

if (_textDirection != update.textDirection) {
_textDirection = update.textDirection;
_markTextDirectionDirty();
Expand Down Expand Up @@ -1591,6 +1621,8 @@ class SemanticsObject {
// The most specific role should take precedence.
if (isPlatformView) {
return PrimaryRole.platformView;
} else if (isHeading) {
return PrimaryRole.heading;
} else if (isTextField) {
return PrimaryRole.textField;
} else if (isIncrementable) {
Expand Down Expand Up @@ -1623,6 +1655,7 @@ class SemanticsObject {
PrimaryRole.image => ImageRoleManager(this),
PrimaryRole.platformView => PlatformViewRoleManager(this),
PrimaryRole.link => Link(this),
PrimaryRole.heading => Heading(this),
kevmoo marked this conversation as resolved.
Show resolved Hide resolved
PrimaryRole.generic => GenericRole(this),
};
}
Expand Down
23 changes: 23 additions & 0 deletions lib/web_ui/test/engine/semantics/semantics_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,27 @@ void _testHeader() {
owner().updateSemantics(builder.build());
expectSemanticsTree(owner(), '''
<sem role="group" aria-label="Header of the page"><sem-c><sem></sem></sem-c></sem>
''');

semantics().semanticsEnabled = false;
});

test('renders aria-level tag for headings with heading level', () {
semantics()
..debugOverrideTimestampFunction(() => _testTime)
..semanticsEnabled = true;

final ui.SemanticsUpdateBuilder builder = ui.SemanticsUpdateBuilder();
updateNode(
builder,
headingLevel: 2,
transform: Matrix4.identity().toFloat64(),
rect: const ui.Rect.fromLTRB(0, 0, 100, 50),
);
Copy link
Contributor

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).

Copy link
Contributor Author

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?.

Copy link
Contributor

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.


owner().updateSemantics(builder.build());
expectSemanticsTree(owner(), '''
<sem aria-level="2" role="heading" style="filter: opacity(0%); color: rgba(0, 0, 0, 0)"></sem>
''');

semantics().semanticsEnabled = false;
Expand Down Expand Up @@ -3557,6 +3578,7 @@ void updateNode(
Int32List? childrenInTraversalOrder,
Int32List? childrenInHitTestOrder,
Int32List? additionalActions,
int headingLevel = 0,
}) {
transform ??= Float64List.fromList(Matrix4.identity().storage);
childrenInTraversalOrder ??= Int32List(0);
Expand Down Expand Up @@ -3596,6 +3618,7 @@ void updateNode(
childrenInTraversalOrder: childrenInTraversalOrder,
childrenInHitTestOrder: childrenInHitTestOrder,
additionalActions: additionalActions,
headingLevel: headingLevel,
);
}

Expand Down
2 changes: 2 additions & 0 deletions lib/web_ui/test/engine/semantics/semantics_tester.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class SemanticsTester {
Float64List? transform,
Int32List? additionalActions,
List<SemanticsNodeUpdate>? children,
int? headingLevel,
}) {
// Flags
if (hasCheckedState ?? false) {
Expand Down Expand Up @@ -311,6 +312,7 @@ class SemanticsTester {
childrenInTraversalOrder: childIds,
childrenInHitTestOrder: childIds,
additionalActions: additionalActions ?? Int32List(0),
headingLevel: headingLevel ?? 0,
);
_nodeUpdates.add(update);
return update;
Expand Down
5 changes: 5 additions & 0 deletions shell/platform/embedder/fixtures/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Future<void> a11y_main() async {
tooltip: 'tooltip',
textDirection: TextDirection.ltr,
additionalActions: Int32List(0),
headingLevel: 0
)
..updateNode(
id: 84,
Expand Down Expand Up @@ -213,6 +214,7 @@ Future<void> a11y_main() async {
additionalActions: Int32List(0),
childrenInHitTestOrder: Int32List(0),
childrenInTraversalOrder: Int32List(0),
headingLevel: 0
)
..updateNode(
id: 96,
Expand Down Expand Up @@ -248,6 +250,7 @@ Future<void> a11y_main() async {
tooltip: 'tooltip',
textDirection: TextDirection.ltr,
additionalActions: Int32List(0),
headingLevel: 0
)
..updateNode(
id: 128,
Expand Down Expand Up @@ -283,6 +286,7 @@ Future<void> a11y_main() async {
textDirection: TextDirection.ltr,
childrenInHitTestOrder: Int32List(0),
childrenInTraversalOrder: Int32List(0),
headingLevel: 0
)
..updateCustomAction(
id: 21,
Expand Down Expand Up @@ -379,6 +383,7 @@ Future<void> a11y_string_attributes() async {
tooltip: 'tooltip',
textDirection: TextDirection.ltr,
additionalActions: Int32List(0),
headingLevel: 0,
);

PlatformDispatcher.instance.views.first.updateSemantics(builder.build());
Expand Down
Loading