• Elly Fong-Jones's avatar
    permissions: add accessible title to permission prompt bubble · 112eca96
    Elly Fong-Jones authored
    Currently, the permission prompt bubble's title is "$origin wants to:",
    which causes a confusing screenreader announcement when the bubble
    appears: "Chrome has new window. $origin wants to."
    
    This change introduces a new accessible title, which includes some of
    the requested permissions. Specifically, it is one of:
    
    * "$origin wants to: $permission"
    * "$origin wants to: $permission and $permission"
    * "$origin wants to: $permission, $permission, and more"
    
    To accomplish that, this change:
    1) Adds new strings for those messages
    2) Adds logic to PermissionPromptBubbleView to build the accessible
       title
    3) Slightly refactors PermissionPromptBubbleView to make it possible to
       construct without a live Browser and BrowserWindow, which allows...
    4) Adds unit tests for PermissionPromptBubbleView to cover the new
       behavior
    
    Bug: 434574
    Change-Id: I3b72f1a51489776c059e952da470034e2e8b131b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2116926
    Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
    Reviewed-by: default avatarAdrienne Porter Felt <felt@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#755122}
    112eca96
BUILD.gn 354 KB