mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00

If the img is not valid then its children will be rendered, and the sensible way to handle that is by giving the img a HyperTextAccessible instead of an ImageAccessible. Since the accessible name of such an img should be the value of the alt attribute we add similar logic as ImageAccessible::NativeName() to HyperTextAccessible::NativeName() conditioned on the tag being img.