-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c53528
commit 3271da3
Showing
10 changed files
with
53 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
/** | ||
* Clear the a11y-speak-region elements. | ||
*/ | ||
const clear = function() { | ||
const regions = document.querySelectorAll( '.a11y-speak-region' ); | ||
export default function clear() { | ||
const regions = document.getElementsByClassName( 'a11y-speak-region' ); | ||
|
||
for ( let i = 0; i < regions.length; i++ ) { | ||
regions[ i ].textContent = ''; | ||
} | ||
}; | ||
|
||
export default clear; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import filterMessage from './filterMessage'; | ||
import filterMessage from './filter-message'; | ||
|
||
/** | ||
* Update the ARIA live notification area text node. | ||
* | ||
* @param {string} message The message to be announced by Assistive Technologies. | ||
* @param {string} ariaLive Optional. The politeness level for aria-live. Possible values: | ||
* polite or assertive. Default polite. | ||
* @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'. | ||
*/ | ||
export const speak = function( message, ariaLive ) { | ||
export function speak( message, ariaLive ) { | ||
message = filterMessage( message ); | ||
//TODO: Use native module to speak message | ||
if ( 'assertive' === ariaLive ) { | ||
if ( ariaLive === 'assertive' ) { | ||
} else { | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters