@@ -38,10 +38,10 @@ const SectionHeader = styled.h2`
3838
3939const MobilePreferences = ( props ) => {
4040 const {
41- setTheme, setAutosave, setLinewrap, setTextOutput, setGridOutput, setSoundOutput
41+ setTheme, setAutosave, setLinewrap, setTextOutput, setGridOutput, setSoundOutput, lineNumbers , lintWarning
4242 } = props ;
4343 const {
44- theme, autosave, linewrap, textOutput, gridOutput, soundOutput
44+ theme, autosave, linewrap, textOutput, gridOutput, soundOutput, setLineNumbers , setLintWarning
4545 } = props ;
4646
4747 const generalSettings = [
@@ -91,7 +91,7 @@ const MobilePreferences = (props) => {
9191 }
9292 ] ;
9393
94- const accessibilitySettings = [
94+ const outputSettings = [
9595 {
9696 title : 'Plain-text' ,
9797 value : textOutput ,
@@ -133,6 +133,35 @@ const MobilePreferences = (props) => {
133133 } ,
134134 ] ;
135135
136+ const accessibilitySettings = [
137+ {
138+ title : 'Line Numbers' ,
139+ value : lineNumbers ,
140+ options : [
141+ {
142+ value : true , label : 'On' , ariaLabel : 'line numbers on' , name : 'line numbers' , id : 'line-numbers-on'
143+ } ,
144+ {
145+ value : false , label : 'Off' , ariaLabel : 'line numbers off' , name : 'line numbers' , id : 'line-numbers-off'
146+ } ,
147+ ] ,
148+ onSelect : x => setLineNumbers ( x )
149+ } ,
150+ {
151+ title : 'Lint Warning Sound' ,
152+ value : lintWarning ,
153+ options : [
154+ {
155+ value : true , label : 'On' , ariaLabel : 'lint warning on' , name : 'lint warning' , id : 'lint-warning-on'
156+ } ,
157+ {
158+ value : false , label : 'Off' , ariaLabel : 'lint warning off' , name : 'lint warning' , id : 'lint-warning-off'
159+ } ,
160+ ] ,
161+ onSelect : x => setLintWarning ( x )
162+ } ,
163+ ] ;
164+
136165 // useEffect(() => { });
137166
138167 return (
@@ -156,12 +185,17 @@ const MobilePreferences = (props) => {
156185 < SectionHeader > Accessibility</ SectionHeader >
157186 { accessibilitySettings . map ( option => < Selector key = { `${ option . title } wrapper` } { ...option } /> ) }
158187
188+ < SectionHeader > Accessible Output</ SectionHeader >
189+ < h3 > Used with screen reader</ h3 >
190+ { outputSettings . map ( option => < Selector key = { `${ option . title } wrapper` } { ...option } /> ) }
191+
159192 </ Content >
160193 </ section >
161194 </ section >
162195 </ Screen > ) ;
163196} ;
164197
198+
165199MobilePreferences . propTypes = {
166200 fontSize : PropTypes . number . isRequired ,
167201 lineNumbers : PropTypes . bool . isRequired ,
0 commit comments