Skip to content

AppBar accessibility traversal order  #98570

Closed

Description

@yarmDev

Hello,

When we use a SliverAppBar, we notice that the semantic order is defined in this way: Leading -> Title -> Actions -> Bottom -> FlexingSpace.


I think it could be useful to be able to modify this order, for example the Bottom at the end

Thanks for your help :)

Activity

  1. darshankawar commented on Feb 16, 2022

    @darshankawar
    Member

    @yarmDev
    Check this issue comment for your reference and see by using Semantics( sortKey: OrdinalSortKey if it helps to achieve your use case.

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 16, 2022
  3. yarmDev commented on Feb 16, 2022

    @yarmDev
    Author

    I have already tried to use the sortKey in the SliverAppBar, it does not change.
    I think the sortkeys inside the appBar take over

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 16, 2022
  5. darshankawar commented on Feb 17, 2022

    @darshankawar
    Member

    @yarmDev
    Can you provide a code sample that shows the current behavior along with an expected result you are looking for ?

  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 17, 2022
  7. yarmDev commented on Feb 17, 2022

    @yarmDev
    Author
        SliverAppBar(
          floating: false,
          pinned: true,
          snap: false,
          expandedHeight: getExpandedHeight(),
          leading: canPop(context)
              ? Container(
                  margin: const EdgeInsets.all(Dimens.halfSpacing),
                  child: AppBarBackButton(
                    onPressed: pop(context),
                  ))
              : null,
          actionsIconTheme: IconThemeData(
            color: Theme.of(context).colorScheme.onPrimary, //change your color here
          ),
          iconTheme: IconThemeData(
            color: Theme.of(context).colorScheme.onPrimary, //change your color here
          ),
          // status bar brightness
          elevation: 0,
          backgroundColor: Colors.transparent,
          title: AnimatedOpacity(
            duration: const Duration(milliseconds: 300),
            opacity: widget.showSmallBar ? 1.0 : 0.0,
            curve: Curves.ease,
            onEnd: () {
              setState(() {
                renderSmallBar = widget.showSmallBar;
              });
            },
            child: renderSmallBar ? widget.smallBar : null,
          ),
          collapsedHeight: widget.disableCollapse == true ? getExpandedHeight() : null,
          flexibleSpace: BackgroundFlexibleSpaceBar(
            collapseMode: CollapseMode.pin,
            background: Container(
              color: Theme.of(context).colorScheme.background,
              child: AnimatedOpacity(
                duration: const Duration(milliseconds: 300),
                opacity: !widget.showSmallBar ? 1.0 : 0.0,
                curve: Curves.ease,
                onEnd: () {
                  setState(() {
                    renderSmallBar = widget.showSmallBar;
                  });
                },
                child: widget.expandedBar,
              ),
            ),
          ),
          bottom: widget.bottom, //TABS
        );

    this is the current behavior:

    Enregistrement.de.l.ecran.2022-02-17.a.12.56.53.mov

    I would like to be able to select the searchForm after the backButton, it seems more logical to me

  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 17, 2022
  9. darshankawar commented on Feb 18, 2022

    @darshankawar
    Member

    @yarmDev
    Have you tried using ExcludeSemantics widget ? You can read more about it here https://api.flutter.dev/flutter/widgets/ExcludeSemantics-class.html and see if it helps to arrange traversal order per your requirement.

  10. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 18, 2022
  11. yarmDev commented on Feb 20, 2022

    @yarmDev
    Author

    In fact I wouldn't want to exclude the bottom.

  12. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 20, 2022
  13. darshankawar commented on Feb 21, 2022

    @darshankawar
    Member

    @yarmDev
    It seems the code you shared has lot of custom implementation, can you provide a runnable code sample that we can directly run and verify ?

  14. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 21, 2022
  15. 29 remaining items

  16. chunhtai commented on Jan 9, 2025

    @chunhtai
    Contributor

    Looks like it is the sort key in the appbar that causes issue, we will probably need to investigate how to properly assign sortkey.

  17. added
    P2Important issues not at the top of the work list
    on Jan 9, 2025
  18. self-assigned this
    on Jan 29, 2025
  19. moved this to In Progress in Framework A11y Hotliston Feb 3, 2025
  20. added
    r: fixedIssue is closed as already fixed in a newer version
    on Feb 17, 2025
  21. github-actions commented on Mar 3, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  22. locked as resolved and limited conversation to collaborators on Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: castawayframeworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions