• Joanmarie Diggs's avatar
    Don't calculate a button's accessible name from the selected popup item · 8a460e0f
    Joanmarie Diggs authored
    We assign ax::mojom::Role::kPopUpButton for both native select elements
    with a size of 1 and button widgets with a non-false aria-popup value.
    
    In case of native select elements, it makes sense (and is specified)
    that the selected item should participate in the accessible name
    calculation. In the case of button widgets with a non-false value
    for aria-popup, it does not make sense for this participation to occur,
    however it was taking place as a side effect of
    https://chromium-review.googlesource.com/1249887.
    
    While we could create a new ax::mojom::Role type to distinguish these
    two popup button widgets, for the most part they behave very similar
    fashions. Therefore, fix the name calculation regression by checking
    if the object with Role::kPopUpButton is a native select element.
    
    Bug: 950761
    Change-Id: I9c31c5d6e219bd31f80e6145dda38127fa353f08
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1562725
    Auto-Submit: Joanmarie Diggs <jdiggs@igalia.com>
    Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
    Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#650554}
    8a460e0f
button-with-listbox-popup-expected-blink.txt 398 Bytes