Skip to content

Commit

Permalink
accessibility: Conditionally render menu items based on drawer visibi…
Browse files Browse the repository at this point in the history
…lity

Modify the rendering logic to conditionally display menu items only when the
drawer is not visible. This prevents `IgnorePointer` from interfering with
accessibility events by rendering an empty `Container` when the drawer is
visible.
  • Loading branch information
calcitem committed Jun 28, 2024
1 parent fcd8310 commit c5a4b26
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,12 @@ class CustomDrawerState extends State<CustomDrawer>
builder: (_, CustomDrawerValue value, Widget? child) => InkWell(
onTap: _drawerController.hideDrawer,
focusColor: Colors.transparent,
child: IgnorePointer(
ignoring: value.isDrawerVisible,
child: child,
),
child: DB().generalSettings.screenReaderSupport
? (value.isDrawerVisible ? Container() : child)
: IgnorePointer(
ignoring: value.isDrawerVisible,
child: child,
),
),
child: DecoratedBox(
decoration: const BoxDecoration(
Expand Down

0 comments on commit c5a4b26

Please sign in to comment.