From 80b731434a4d4647374a39ab3f2966266f3540b8 Mon Sep 17 00:00:00 2001 From: AlmeroSteyn Date: Wed, 10 Apr 2019 15:17:55 +0200 Subject: [PATCH] Add hotfix for https://github.com/nvaccess/nvda/issues/5448 --- CHANGELOG.md | 11 +++++++---- package.json | 2 +- src/modules/MessageBlock.js | 1 + .../__tests__/__snapshots__/Announcer.spec.js.snap | 4 ++++ .../__tests__/__snapshots__/MessageBlock.spec.js.snap | 2 ++ 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6ae88c..50dd417 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.5 (Apr 10, 2019) + +Add nowrap style to hidden regions to hotfix issue [https://github.com/nvaccess/nvda/issues/5448](https://github.com/nvaccess/nvda/issues/5448) + ## 2.0.4 (Mar 18, 2019) Log a warning if the context is missing ([Jeremy Einfeld](https://github.com/JeremyEinfeld)) @@ -8,7 +12,7 @@ Move live region container to bottom of the announcer to reduce accidental navig ## 2.0.2 (May 31, 2018) -* Enable easier rebroadcast of messages when required. +* Enable easier rebroadcast of messages when required. ## 2.0.1 (May 31, 2018) @@ -18,7 +22,7 @@ Move live region container to bottom of the announcer to reduce accidental navig * Rewrite of package using the new React Context API. * Removal of the old context API. -* Introduction of new LiveMessenger component to allow direct access to raw functions. +* Introduction of new LiveMessenger component to allow direct access to raw functions. ## 1.0.6 (May 30, 2018) @@ -26,7 +30,7 @@ Move live region container to bottom of the announcer to reduce accidental navig ## 1.0.5 (February 5, 2018) -* Add `clearOnUnmount` prop to toggle clearing live region on unmount of `LiveMessage`. +* Add `clearOnUnmount` prop to toggle clearing live region on unmount of `LiveMessage`. ## 1.0.4 (September 11, 2017) @@ -49,4 +53,3 @@ Move live region container to bottom of the announcer to reduce accidental navig ## 1.0.0 * Initial creation - diff --git a/package.json b/package.json index e393809..26cc0cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-aria-live", - "version": "2.0.4", + "version": "2.0.5", "description": "Add aria-live messaging to your React app", "main": "lib/index.js", "module": "es/index.js", diff --git a/src/modules/MessageBlock.js b/src/modules/MessageBlock.js index 77ee085..90527d7 100644 --- a/src/modules/MessageBlock.js +++ b/src/modules/MessageBlock.js @@ -7,6 +7,7 @@ const offScreenStyle = { height: '1px', margin: '-1px', overflow: 'hidden', + whiteSpace: 'nowrap', padding: 0, width: '1px', position: 'absolute', diff --git a/src/modules/__tests__/__snapshots__/Announcer.spec.js.snap b/src/modules/__tests__/__snapshots__/Announcer.spec.js.snap index d77cb6a..028127c 100644 --- a/src/modules/__tests__/__snapshots__/Announcer.spec.js.snap +++ b/src/modules/__tests__/__snapshots__/Announcer.spec.js.snap @@ -22,6 +22,7 @@ exports[`Announcer should render correctly via snapshot 1`] = ` "overflow": "hidden", "padding": 0, "position": "absolute", + "whiteSpace": "nowrap", "width": "1px", } } @@ -43,6 +44,7 @@ exports[`Announcer should render correctly via snapshot 1`] = ` "overflow": "hidden", "padding": 0, "position": "absolute", + "whiteSpace": "nowrap", "width": "1px", } } @@ -64,6 +66,7 @@ exports[`Announcer should render correctly via snapshot 1`] = ` "overflow": "hidden", "padding": 0, "position": "absolute", + "whiteSpace": "nowrap", "width": "1px", } } @@ -85,6 +88,7 @@ exports[`Announcer should render correctly via snapshot 1`] = ` "overflow": "hidden", "padding": 0, "position": "absolute", + "whiteSpace": "nowrap", "width": "1px", } } diff --git a/src/modules/__tests__/__snapshots__/MessageBlock.spec.js.snap b/src/modules/__tests__/__snapshots__/MessageBlock.spec.js.snap index 027cd21..6139a11 100644 --- a/src/modules/__tests__/__snapshots__/MessageBlock.spec.js.snap +++ b/src/modules/__tests__/__snapshots__/MessageBlock.spec.js.snap @@ -13,6 +13,7 @@ exports[`MessageBlock should render correctly via snapshot 1`] = ` "overflow": "hidden", "padding": 0, "position": "absolute", + "whiteSpace": "nowrap", "width": "1px", } } @@ -34,6 +35,7 @@ exports[`MessageBlock should render correctly via snapshot for an empty message "overflow": "hidden", "padding": 0, "position": "absolute", + "whiteSpace": "nowrap", "width": "1px", } }