swift-ios- Accessibility - change Voiceover read/focus order to content view first then the navigation items?











up vote
1
down vote

favorite












I am designing an app with accessibility enabled. I have
a rightBarButtonItem on the navigationBar , several labels in between
and a button located at the bottom.



I want to achieve the following behaviour :
Every time the current view is loaded, the VoiceOver focus will:




  1. start from the topmost label

  2. visit all labels from top to bottom

  3. then, the bottom button

  4. finally, rightBarButtonItem


To ensure such order, I coded in the viewController



navigationController?.view.accessibilityElements = [label1, label2, button, navigationItem.rightBarButtonItem]


It did ensure the read order but the focus order failed at the rightBarButtonItem. It couldn't be clicked.



How to solve this problem?










share|improve this question









New contributor




C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    1
    down vote

    favorite












    I am designing an app with accessibility enabled. I have
    a rightBarButtonItem on the navigationBar , several labels in between
    and a button located at the bottom.



    I want to achieve the following behaviour :
    Every time the current view is loaded, the VoiceOver focus will:




    1. start from the topmost label

    2. visit all labels from top to bottom

    3. then, the bottom button

    4. finally, rightBarButtonItem


    To ensure such order, I coded in the viewController



    navigationController?.view.accessibilityElements = [label1, label2, button, navigationItem.rightBarButtonItem]


    It did ensure the read order but the focus order failed at the rightBarButtonItem. It couldn't be clicked.



    How to solve this problem?










    share|improve this question









    New contributor




    C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am designing an app with accessibility enabled. I have
      a rightBarButtonItem on the navigationBar , several labels in between
      and a button located at the bottom.



      I want to achieve the following behaviour :
      Every time the current view is loaded, the VoiceOver focus will:




      1. start from the topmost label

      2. visit all labels from top to bottom

      3. then, the bottom button

      4. finally, rightBarButtonItem


      To ensure such order, I coded in the viewController



      navigationController?.view.accessibilityElements = [label1, label2, button, navigationItem.rightBarButtonItem]


      It did ensure the read order but the focus order failed at the rightBarButtonItem. It couldn't be clicked.



      How to solve this problem?










      share|improve this question









      New contributor




      C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I am designing an app with accessibility enabled. I have
      a rightBarButtonItem on the navigationBar , several labels in between
      and a button located at the bottom.



      I want to achieve the following behaviour :
      Every time the current view is loaded, the VoiceOver focus will:




      1. start from the topmost label

      2. visit all labels from top to bottom

      3. then, the bottom button

      4. finally, rightBarButtonItem


      To ensure such order, I coded in the viewController



      navigationController?.view.accessibilityElements = [label1, label2, button, navigationItem.rightBarButtonItem]


      It did ensure the read order but the focus order failed at the rightBarButtonItem. It couldn't be clicked.



      How to solve this problem?







      ios swift accessibility voiceover tab-ordering






      share|improve this question









      New contributor




      C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 10 hours ago









      Shruti Thombre

      227216




      227216






      New contributor




      C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 16 at 23:32









      C.Peng

      61




      61




      New contributor




      C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      C.Peng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Every time your current view is loaded, use the UIAccessibilityPostNotification method to get your purpose.



          There are several types of change notifications but UIAccessibilityScreenChangedNotification may be the one you're interested in.



          It notifies that the whole page has changed including nil or a UIObject as incoming parameters :




          • With nil, the first accessible element in the page is focused.

          • With a UIObject, focus is shifted to the specified element.


          This notification comes along with a vocalization including a sound like announcing a new page.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            C.Peng is a new contributor. Be nice, and check out our Code of Conduct.










             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53346725%2fswift-ios-accessibility-change-voiceover-read-focus-order-to-content-view-fir%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Every time your current view is loaded, use the UIAccessibilityPostNotification method to get your purpose.



            There are several types of change notifications but UIAccessibilityScreenChangedNotification may be the one you're interested in.



            It notifies that the whole page has changed including nil or a UIObject as incoming parameters :




            • With nil, the first accessible element in the page is focused.

            • With a UIObject, focus is shifted to the specified element.


            This notification comes along with a vocalization including a sound like announcing a new page.






            share|improve this answer



























              up vote
              0
              down vote













              Every time your current view is loaded, use the UIAccessibilityPostNotification method to get your purpose.



              There are several types of change notifications but UIAccessibilityScreenChangedNotification may be the one you're interested in.



              It notifies that the whole page has changed including nil or a UIObject as incoming parameters :




              • With nil, the first accessible element in the page is focused.

              • With a UIObject, focus is shifted to the specified element.


              This notification comes along with a vocalization including a sound like announcing a new page.






              share|improve this answer

























                up vote
                0
                down vote










                up vote
                0
                down vote









                Every time your current view is loaded, use the UIAccessibilityPostNotification method to get your purpose.



                There are several types of change notifications but UIAccessibilityScreenChangedNotification may be the one you're interested in.



                It notifies that the whole page has changed including nil or a UIObject as incoming parameters :




                • With nil, the first accessible element in the page is focused.

                • With a UIObject, focus is shifted to the specified element.


                This notification comes along with a vocalization including a sound like announcing a new page.






                share|improve this answer














                Every time your current view is loaded, use the UIAccessibilityPostNotification method to get your purpose.



                There are several types of change notifications but UIAccessibilityScreenChangedNotification may be the one you're interested in.



                It notifies that the whole page has changed including nil or a UIObject as incoming parameters :




                • With nil, the first accessible element in the page is focused.

                • With a UIObject, focus is shifted to the specified element.


                This notification comes along with a vocalization including a sound like announcing a new page.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 12 hours ago

























                answered yesterday









                XLE_22

                28437




                28437






















                    C.Peng is a new contributor. Be nice, and check out our Code of Conduct.










                     

                    draft saved


                    draft discarded


















                    C.Peng is a new contributor. Be nice, and check out our Code of Conduct.













                    C.Peng is a new contributor. Be nice, and check out our Code of Conduct.












                    C.Peng is a new contributor. Be nice, and check out our Code of Conduct.















                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53346725%2fswift-ios-accessibility-change-voiceover-read-focus-order-to-content-view-fir%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Cypress Hill

                    what are some tips for doing well in the interview? [on hold]

                    How does a super-power salesman not get shut down for legal reasons?