Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Closed
Changes from 1 commit
Commits
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
Prev Previous commit
omit href when not present
  • Loading branch information
mdebbar committed May 31, 2024
commit 2b7967aad704a6f1645a20649a47780f44764623
5 changes: 3 additions & 2 deletions lib/web_ui/lib/src/engine/semantics/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ class Link extends PrimaryRoleManager {
@override
DomElement createElement() {
final DomElement element = domDocument.createElement('a');
// TODO: The <a> element has `aria-label={value}`. We should stop that!
element.setAttribute('href', semanticsObject.hasValue ? semanticsObject.value! : '#');
if (semanticsObject.hasValue) {
element.setAttribute('href', semanticsObject.value!);
}
element.style.display = 'block';
return element;
}
Expand Down