Howdy! I am testing the test Manual check: is the linked document accessible? and I believe I ran into a small bug.

Problem

The test seems to always assume that linked documents are PDF's even if they are not.

See, I just uploaded a Word document but the alert still provides recommendations about PDF's:

Editoria11y shows alert about PDF's even though it is a Word document

Steps to reproduce

  1. Enable editoria11y module
  2. Go to /admin/config/content/editoria11y
  3. Under Advanced configuration expand Modify tests
  4. Under Remind the editor that these linked documents need a manual check enable the test for Word documents and other file types by pasting the value suggested in the field description: a[href$='.pdf'], a[href*='.pdf?'], a[href$='.doc'], a[href$='.docx'], a[href*='.doc?'], a[href*='.docx?'], a[href$='.ppt'], a[href$='.pptx'], a[href*='.ppt?'], a[href*='.pptx?'], a[href^='https://docs.google']
  5. Go to /node/add/page
  6. Upload a Word document in the wysiwyg
  7. Then you will get the screenshot above which refers to the Word document as a PDF. I would have expected generic recommendations (or possibly recommendations specific to Word documents, if any) rather than recommendations that refer to the file as a PDF.

Proposed resolution

I believe this would have to be fixed in the JS library.

CommentFileSizeAuthor
editoria11y_word_pdf.png105.03 KBfengtan

Comments

fengtan created an issue. See original summary.

itmaybejj’s picture

Assigned: Unassigned » itmaybejj

Ahh yes; I need to update that help text. The defaults did change to a[href$='.pdf'], a[href*='.pdf?'] somewhere around 2.2.1, for exactly this reason.

  • itmaybejj committed 01745ce4 on 2.2.x-dev
    fix: #3563957 Linked documents always assumed to be PDF's
    
itmaybejj’s picture

Status: Active » Fixed

fixed in 2.2.19

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

fengtan’s picture

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.