Forms · Select and TextInput label: the name assistive technology reads, drawn nowhere

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 04:59:41 -04:00
1 parent e21336fc1b
commit 8658999903
4 files changed
+25 -3

No files matched your search

+7 -3
View File
@@ -360,9 +360,13 @@ impl Render for TextInput {
div()
.id("ely-text-input")
.role(Role::TextInput)
.when(!self.placeholder.is_empty(), |el| {
el.aria_label(self.placeholder.clone())
})
.when_some(
[&self.label, &self.placeholder]
.into_iter()
.find(|name| !name.is_empty())
.cloned(),
|el, name| el.aria_label(name),
)
.when(!self.masked, |el| el.aria_value(self.text.clone()))
.key_context(CONTEXT)
.track_focus(&self.focus)