Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend-and-label.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=mismatch href="select-appearance-optgroup-legend-ref.html">
<meta name=assert content="The label attribute should take precedence over the legend element">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
select, select::picker(select) {
appearance: base-select;
}
</style>
<select>
<option>one</option>
<optgroup label=label>
<legend>legend</legend>
<option>two</option>
</optgroup>
</select>
<script>
(async () => {
await test_driver.bless();
document.querySelector('select').showPicker();
document.documentElement.classList.remove('reftest-wait');
})();
</script>