Problem/Motivation

If I install the module, the icon is shown, and everything works well.

On the project page, it says:

In block structure add a new block "Accessibility menu". The block will be rendered on a page in a right bottom corner.

... but if I add the block anywhere, it stops working -- this happens both in Olivero and Bootstrap5 themes.

Steps to reproduce

  1. Install the module, and see that it works well
  2. Add the Accessibility block via /admin/structure/block and see that the module stops working, nothing happens when you click the icon

Proposed resolution

Figure out why there is a block option, if it does not do anything?

  • Should the block option be removed entirely from the module?
    -- OR
  • Should the code be updated and fixed, so that the icon can be placed anywhere on the page, via /admin/structure/block?

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ressa created an issue. See original summary.

shank115 made their first commit to this issue’s fork.

shank115’s picture

Status: Active » Needs review

Placing the block renders a second copy of the menu, because the module already adds it to page_bottom when "Enable" is checked. The JS binds to the first button only, so the visible one does nothing.

The MR skips the automatic rendering when an enabled Accessibility menu block is placed in the active theme (the maintenance page still gets it), and moves the menu to the end of body so it also works when the block is in regions like Olivero's footer or social bar.

ressa’s picture

Issue summary: View changes
Status: Needs review » Active

Thanks for a fast answer @shank115, but I feel that we need to go bit deeper.

Like, why is there even a block option, if it does not do anything? I tried your patch, and yes, it now works if I place a block -- but no matter where I place the block, the icon is always in the bottom right corner ...

So since this is such a fundamental piece of the module, I think we need to hear from the creator and maintainer, @anatolij zajika. Should the block option be removed entirely from the module? Or should the code be updated and fixed, so that the icon can be placed anywhere on the page, via /admin/structure/block?