Skip to content

Add “Report Accessibility Issue” contact button to publication pages in Scholars’ Bank #39

@cyphun

Description

@cyphun

As a user viewing a publication in Scholars’ Bank,
I want a clearly visible button that allows me to report accessibility issues with the attached document (e.g., PDF),
So that I can easily notify the library team if I encounter problems accessing the content.

Acceptance criteria:

  1. Button placement & labeling
    • The button is displayed on all publication view pages (item pages) in Scholars’ Bank.
    • The button text reads: “Report an accessibility issue”.
    • The button is visually distinct and accessible (meets WCAG AA contrast requirements).
  2. Behavior on click
    • Clicking the button opens the existing Scholars’ Bank contact page in a new tab (to be confirmed).
    • The contact page is prefilled with:
    • The publication title.
    • The publication handle/URL.
  3. Technical notes
    • Prefill parameters are passed via URL query string (e.g., ?itemTitle=...&itemURL=...) or another mechanism if there is a better option
    • Special characters and spaces are URL encoded.
    • No sensitive information is exposed in the URL.

Additional implementation notes:
- I was unable to find official documentation on how to prefill LibAnswer forms, but you can do something like the following snippet, which assume itemName and itemURL are passed in as URL parameters.

document.addEventListener("DOMContentLoaded", function() {
  const params = new URLSearchParams(window.location.search);
  const itemTitle = params.get("itemTitle");
  const itemURL = params.get("itemURL");

  document.getElementById('pdetails_20077').value =
    'Add more details about the accessibility issue that you would like the report:\n\n\n' +
    'Title: ' + itemTitle + '\n' +
    'URL: ' + itemURL;
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions