mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 07:24:58 +00:00
LibWeb: Remove DOM element deprecated_get_attribute()
This commit is contained in:
parent
c477f90df7
commit
a681429dff
40 changed files with 114 additions and 122 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue