tl;dr; adding an anchor in chrome/browser/resources/options/browser_options.html is raising an AX_TEXT_04 accessibility error and I can't figure out why. The documentation is incomplete. Please help.
I'm trying to add a new 'Learn More' link to chrome/browser/resources/options/browser_options.html and I can't figure out why I'm failing the accessibility tests. This is an excerpt from the trybot:
[18171:18171:0406/151533.990975:INFO:CONSOLE(1221)] "Running TestCase OptionsWebUIExtendedTest.CloseOverlay", source: test_api.js (1221)
[18171:18171:0406/151537.816966:ERROR:web_ui_test_handler.cc(76)] Failed: RUN_TEST_F("OptionsWebUIExtendedTest","CloseOverlay")
Error:
Accessibility issues found on chrome://settings-frame/
*** Begin accessibility audit results ***
An accessibility audit found
Warnings:
Warning: AX_TEXT_04 (The purpose of each link should be clear from the link text) failed on the following element:
#cups-printers-section > .settings-row > A
See https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_text_04 for more information.
*** End accessibility audit results ***
at OptionsWebUIExtendedTest.runAccessibilityAudit (test_api.js:374:17)
at TestCase.runAccessibilityAudit (test_api.js:504:22)
at test_api.js:1020:20
at testDone (test_api.js:786:31)
at HTMLDocument.f (options_browsertest.js:132:7)
gen/chrome/browser/ui/webui/options/options_browsertest-gen.cc:404: Failure
Value of: RunJavascriptTestF( true, "OptionsWebUIExtendedTest", "CloseOverlay")
Actual: false
Expected: true
[18171:18171:0406/151537.983107:WARNING:url_request_context_getter.cc(43)] URLRequestContextGetter leaking due to no owning thread.
[18171:18171:0406/151537.983136:WARNING:url_request_context_getter.cc(43)] URLRequestContextGetter leaking due to no owning thread.
Here's the section in question:
768 <section id="cups-printers-section" hidden>
769 <h3 i18n-content="advancedSectionTitleCupsPrint"></h3>
770 <div class="settings-row">
771 <span i18n-content="cupsPrintOptionLabel"></span>
772 <a target="_blank" i18n-content="learnMore"
773 i18n-values="href:cupsPrintLearnMoreURL">
774 </a>
775 </div>
776 <div class="settings-row">
777 <button id="cupsPrintersManageButton"
778 i18n-content="cupsPrintersManageButton"></button>
779 </div>
780 </section>
AFAICT it's exactly the same as all the other links but if somebody who knows more about the accessibility tests, I'd appreciate it.