From e36b576f9309734a0286cb224aef1f05a881880b Mon Sep 17 00:00:00 2001 From: Michael Polidori Date: Tue, 8 Dec 2020 16:08:49 -0500 Subject: [PATCH] [WCAG][s]: Uses "span" instead of "i" and update version --- dist/Document.js | 12 +++++++----- package.json | 2 +- src/Document.js | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dist/Document.js b/dist/Document.js index 02e10bf..feb9c92 100644 --- a/dist/Document.js +++ b/dist/Document.js @@ -47,7 +47,7 @@ var PdfViewer = function PdfViewer(props) { } }, _react.default.createElement("a", { href: "#previous" - }, _react.default.createElement("i", { + }, _react.default.createElement("span", { className: "arrow-left" }), " Previous")); @@ -56,7 +56,7 @@ var PdfViewer = function PdfViewer(props) { className: "previous disabled" }, _react.default.createElement("a", { href: "#previous" - }, _react.default.createElement("i", { + }, _react.default.createElement("span", { className: "arrow-left" }), " Previous")); } @@ -68,7 +68,7 @@ var PdfViewer = function PdfViewer(props) { } }, _react.default.createElement("a", { href: "#next" - }, "Next ", _react.default.createElement("i", { + }, "Next ", _react.default.createElement("span", { className: "arrow-right" }))); @@ -77,12 +77,14 @@ var PdfViewer = function PdfViewer(props) { className: "next disabled" }, _react.default.createElement("a", { href: "#next" - }, "Next ", _react.default.createElement("i", { + }, "Next ", _react.default.createElement("span", { className: "arrow-right" }))); } - return _react.default.createElement("nav", null, _react.default.createElement("ul", { + return _react.default.createElement("nav", { + "aria-label": "Navigate pages: Previous/Next" + }, _react.default.createElement("ul", { className: "pager" }, previousButton, nextButton)); }; diff --git a/package.json b/package.json index 7b936d1..0d29b2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@datopian/datapackage-views-js", - "version": "1.3.17", + "version": "1.3.18", "private": false, "main": "/dist/App.js", "module": "/dist/App.js", diff --git a/src/Document.js b/src/Document.js index da4ceb2..49125b7 100644 --- a/src/Document.js +++ b/src/Document.js @@ -12,16 +12,16 @@ const PdfViewer = (props) => { if (!pages) { return null; } - let previousButton =
  • setPage(page - 1)}> Previous
  • ; + let previousButton =
  • setPage(page - 1)}> Previous
  • ; if (page === 1) { - previousButton =
  • Previous
  • ; + previousButton =
  • Previous
  • ; } - let nextButton =
  • setPage(page + 1)}>Next
  • ; + let nextButton =
  • setPage(page + 1)}>Next
  • ; if (page === pages) { - nextButton =
  • Next
  • ; + nextButton =
  • Next
  • ; } return ( -