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

[web] Don't add href="#" to semantics links #53395

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Jun 14, 2024

This is a stopgap for issues like flutter/flutter#146291 until we land better link semantics (in flutter/flutter#150263 and flutter/packages#6711). For the time being, the href="#" isn't providing any extra value, and is causing the browser to navigate to to # whenever the semantics link is clicked, which is undesirable.

Fixes flutter/flutter#146291

@mdebbar mdebbar requested review from yjbanov and chunhtai June 14, 2024 15:49
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Jun 14, 2024
@@ -18,9 +18,8 @@ class Link extends PrimaryRoleManager {
@override
DomElement createElement() {
final DomElement element = domDocument.createElement('a');
// TODO(chunhtai): Fill in the real link once the framework sends entire uri.
// https://github.com/flutter/flutter/issues/102535.
element.setAttribute('href', '#');
Copy link
Contributor

Choose a reason for hiding this comment

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

what will happen if there isn't a href?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When you click on it, the browser doesn't navigate. It's still announced as a link by VoiceOver.

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@mdebbar mdebbar added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Jun 20, 2024
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 20, 2024
@auto-submit auto-submit bot merged commit 1ad7953 into flutter:main Jun 20, 2024
29 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 21, 2024
@mdebbar mdebbar deleted the link_href_remove branch June 21, 2024 17:15
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 21, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 21, 2024
…150637)

flutter/engine@dda82d9...33415c6

2024-06-21 skia-flutter-autoroll@skia.org Roll Dart SDK from 4483d67ba725 to fc1e5912fc94 (1 revision) (flutter/engine#53503)
2024-06-21 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix focus management for text fields (#51009)" (flutter/engine#53502)
2024-06-21 skia-flutter-autoroll@skia.org Roll Dart SDK from 19d3e659f49a to 4483d67ba725 (2 revisions) (flutter/engine#53501)
2024-06-20 mdebbar@google.com [web] Add 'flt-semantics-identifier' attribute to semantics nodes (flutter/engine#53278)
2024-06-20 mdebbar@google.com [web] Don't add `href="#"` to semantics links (flutter/engine#53395)
2024-06-20 skia-flutter-autoroll@skia.org Roll Dart SDK from be6b533e07e7 to 19d3e659f49a (1 revision) (flutter/engine#53495)
2024-06-20 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from tD5pof7jVnbXPwP7l... to iU-B6rJxy0wUYSmmp... (flutter/engine#53493)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from tD5pof7jVnbX to iU-B6rJxy0wU

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
sigurdm pushed a commit to sigurdm/flutter that referenced this pull request Jun 26, 2024
…lutter#150637)

flutter/engine@dda82d9...33415c6

2024-06-21 skia-flutter-autoroll@skia.org Roll Dart SDK from 4483d67ba725 to fc1e5912fc94 (1 revision) (flutter/engine#53503)
2024-06-21 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix focus management for text fields (flutter#51009)" (flutter/engine#53502)
2024-06-21 skia-flutter-autoroll@skia.org Roll Dart SDK from 19d3e659f49a to 4483d67ba725 (2 revisions) (flutter/engine#53501)
2024-06-20 mdebbar@google.com [web] Add 'flt-semantics-identifier' attribute to semantics nodes (flutter/engine#53278)
2024-06-20 mdebbar@google.com [web] Don't add `href="#"` to semantics links (flutter/engine#53395)
2024-06-20 skia-flutter-autoroll@skia.org Roll Dart SDK from be6b533e07e7 to 19d3e659f49a (1 revision) (flutter/engine#53495)
2024-06-20 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from tD5pof7jVnbXPwP7l... to iU-B6rJxy0wUYSmmp... (flutter/engine#53493)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from tD5pof7jVnbX to iU-B6rJxy0wU

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking on a link in a Flutter Web page using an accessibility service causes the page to reload
3 participants