department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

SPIKE: Prevent editors from saving content with links with no discernible text #4806

Open kevwalsh opened 3 years ago

kevwalsh commented 3 years ago

User Story or Problem Statement

As an editor, i want good feedback if i try to include bad links, such as

See also #5462

Links with non-discernible text

<a href="mailto:judith.brown2@va.gov" target="_blank"> </a>

Acceptance Criteria

Timebox at 5

Implementation steps

TBD

Previous Team Points

5

1Copenut commented 3 years ago

Related issue: https://github.com/department-of-veterans-affairs/va.gov-team/issues/22139

kevwalsh commented 3 years ago

jenkins___testing_content-build-integration-testing___content-build-integration-testing____102.png

 - sitemap 1/4 (24m 24s)

[2021-05-26T16:22:24.032Z]    Failed [fail]: (

[2021-05-26T16:22:24.032Z]              Description:  Links must have discernible text

[2021-05-26T16:22:24.032Z]              Impact:       serious

[2021-05-26T16:22:24.032Z]              Rule ID:      link-name

[2021-05-26T16:22:24.032Z]              URL:          http://content-build:3001/hudson-valley-health-care/nurse-residency-programs/

[2021-05-26T16:22:24.032Z]              DOM node:     

[2021-05-26T16:22:24.032Z]    <a href="mailto:judith.brown2@va.gov" target="_blank"> </a>

[2021-05-26T16:22:24.032Z]    a[href="mailto\:judith\.brown2\@va\.gov"][target="_blank"]:nth-child(2)

[2021-05-26T16:22:24.032Z]              More help:    https://dequeuniversity.com/rules/axe/4.1/link-name?application=axeAPI

[2021-05-26T16:22:24.032Z]            )

[2021-05-26T16:22:24.032Z]              Description:  Links must have discernible text

[2021-05-26T16:22:24.032Z]              Impact:       serious

[2021-05-26T16:22:24.032Z]              Rule ID:      link-name

[2021-05-26T16:22:24.032Z]              URL:          http://content-build:3001/hudson-valley-health-care/nurse-residency-programs/

[2021-05-26T16:22:24.032Z]              DOM node:     

[2021-05-26T16:22:24.032Z]    <a href="mailto:judith.brown2@va.gov" target="_blank"> </a>

[2021-05-26T16:22:24.032Z]    a[href="mailto\:judith\.brown2\@va\.gov"][target="_blank"]:nth-child(2)

[2021-05-26T16:22:24.032Z]              More help:    https://dequeuniversity.com/rules/axe/4.1/link-name?application=axeAPI

[2021-05-26T16:22:24.032Z]            ): Failed [fail]: (

[2021-05-26T16:22:24.032Z]              Description:  Links must have discernible text

[2021-05-26T16:22:24.032Z]              Impact:       serious

[2021-05-26T16:22:24.032Z]              Rule ID:      link-name

[2021-05-26T16:22:24.032Z]              URL:          http://content-build:3001/hudson-valley-health-care/nurse-residency-programs/

[2021-05-26T16:22:24.032Z]              DOM node:     

[2021-05-26T16:22:24.032Z]    <a href="mailto:judith.brown2@va.gov" target="_blank"> </a>

[2021-05-26T16:22:24.032Z]    a[href="mailto\:judith\.brown2\@va\.gov"][target="_blank"]:nth-child(2)

[2021-05-26T16:22:24.032Z]              More help:    https://dequeuniversity.com/rules/axe/4.1/link-name?application=axeAPI

[2021-05-26T16:22:24.032Z]            ) - Expected "undefined" but got: "undefined"

[2021-05-26T16:22:24.032Z]        at forEach (/application/content-build/src/platform/testing/e2e/nightwatch-commands/axeCheck.js:85:21)

[2021-05-26T16:22:24.032Z]        at Array.forEach (<anonymous>)

[2021-05-26T16:22:24.032Z]        at Object.<anonymous> (/application/content-build/src/platform/testing/e2e/nightwatch-commands/axeCheck.js:72:18)
swirtSJW commented 3 years ago

AS of this pr we are warning in the broken link report. It does not prevent saving, but does call it out. https://github.com/department-of-veterans-affairs/va.gov-cms/issues/5442

EWashb commented 1 year ago

Although an old ticket, I'm going to add it to the requirements definition pipeline since Laura added the appropriate accessibility label recently

srancour commented 4 days ago

@gracekretschmer-metrostar this could be a good opportunity with helping editors to make their content more accessible along with the PDF and alt-text work.