mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +00:00
LibWeb: Remove DOM element deprecated_get_attribute()
This commit is contained in:
committed by
Andrew Kaster
parent
c477f90df7
commit
a681429dff
@@ -193,9 +193,10 @@ Optional<ARIA::Role> HTMLSelectElement::default_role() const
|
||||
if (has_attribute(AttributeNames::multiple))
|
||||
return ARIA::Role::listbox;
|
||||
if (has_attribute(AttributeNames::size)) {
|
||||
auto size_attribute = deprecated_attribute(AttributeNames::size).to_number<int>();
|
||||
if (size_attribute.has_value() && size_attribute.value() > 1)
|
||||
return ARIA::Role::listbox;
|
||||
if (auto size_string = get_attribute(HTML::AttributeNames::size); size_string.has_value()) {
|
||||
if (auto size = size_string->to_number<int>(); size.has_value() && *size > 1)
|
||||
return ARIA::Role::listbox;
|
||||
}
|
||||
}
|
||||
// https://www.w3.org/TR/html-aria/#el-select
|
||||
return ARIA::Role::combobox;
|
||||
|
||||
Reference in New Issue
Block a user