|
|
@ -451,11 +451,12 @@ export default class Element extends Node {
|
|
|
|
if (this.name === 'input') {
|
|
|
|
if (this.name === 'input') {
|
|
|
|
const type = attribute_map.get('type');
|
|
|
|
const type = attribute_map.get('type');
|
|
|
|
if (type && type.get_static_value() === 'image') {
|
|
|
|
if (type && type.get_static_value() === 'image') {
|
|
|
|
should_have_attribute(
|
|
|
|
const required_attributes = ['alt', 'aria-label', 'aria-labelledby'];
|
|
|
|
this,
|
|
|
|
const has_attribute = required_attributes.some(name => attribute_map.has(name));
|
|
|
|
['alt', 'aria-label', 'aria-labelledby'],
|
|
|
|
|
|
|
|
'input type="image"'
|
|
|
|
if (!has_attribute) {
|
|
|
|
);
|
|
|
|
should_have_attribute(this, required_attributes, 'input type="image"');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|