Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(UI builder): Add ability to compute screen reader narration of f…
…ocused element in … …use mode (#15464) * Integrated the message computation script by Adam into UI Builder * Rename and reformat changes * Fix type errors * Implement suggestions from PR for better readability of the code * Refactorring of the code. Mainly rewritten the large computeMessage() function into smaller ones. * Fix narration computation for elements with checked DOM property as state. Fix textarea not to narrate value. Refactoring and comment edit and addition. * Rename to screen reader narration computation * Refactor getDefinitionName() method in NarrationComputer.tsx for conciseness Co-authored-by: Charles Assunção <junioassuncaocharles@gmail.com> * Replace default exports with named exports. * Remove private modifier * Change to a more readable type * Rewrite the code not to use label for the for-loop and refactoring * Update packages/fluentui/react-builder/src/components/NarrationComputer.tsx Co-authored-by: Charles Assunção <junioassuncaocharles@gmail.com> * Reverting the last commit, * Comment change * Replace for loop with Array.forEach(). * Resolve lint errors * Remove empty file northstar. Have no idea how it was created- * Remove showNarration condition * Replace condition with ternary operator. * Add missing quotes in a CSS definition. Co-authored-by: Charles Assunção <junioassuncaocharles@gmail.com> * Replace condition with ternary operator * Rename parameter and add type" * Integrate descendant element screen reader narration computation into the UI Builder * Refactoring and handle the case where there are no elements for the selected component. * Refactoring, narration now computes for all focusable elements, and path shows computed name of element. * Fix for duplicate narration of the text 'Narration: ' * Add a small comment * Add a comment and parenthesis around a arrow function parameter * Edit comment and try to add parenthesis again * Revert the change to config.ts and refactoring of a if statement * Refactor for loop into forEach loop * Screen reader now computes the narration immediately on every change of component props * Add ability to compute screen reader narration of focused element in use mode. Fix bug with narration path dropdown always selecting the first option. Co-authored-by: Charles Assunção <junioassuncaocharles@gmail.com>
- Loading branch information