Accessibility and adding focus order to components

Hi I am a visually impaired student and currently building accessible plugins. I have started using this editor and it is fantastic. I need to add .setExplicitFocusOrder to each slider. Is this something that could be added in the menus with tooltips etc? it would be really helpful. I can’t currently find any other way to add this to the code, any help would be greatly appreciated.

Also is there a way to add .setDescription to components

Hi and thank you so much for trying the accessibility in PluginGuiMagic.
I started this in a new branch feature/accessibility:
https://github.com/ffAudio/foleys_gui_magic/compare/develop...feature/accessibility

I’ll add the setExplicitFocusOrder as well, please let me know if that is enough or if there is something else I need to do to expose juce’s accessibility features.

This is fantastic have just tried it out. There are a few other features, I will have a play over the next few days and see what will be most useful. Thank you for making this happen so fast.

This is fantastic. could you please add

setTitle()
with
setExplicitFocusOrder()

Thanks for checking it out. I have added setTitle() and setExplicitFocusOrder().
If that works I will merge that into develop.

that’s working perfectly thank you.

one last useful asset would be to use the “view” container as a focus container to create components groups to search.

this would be

setFocusContainerType (FocusContainerType::focusContainer);

This is used in the JUCE accessibility demo, Custom navigation.

one last thing, is it possible currently to set a sliders text box to editable?
This is really useful when using a screen reader to set values quickly as it can be quite slow using key commands on frequency controls in particular.

Thank you for all the recent editions, I have nearly finished my first fully accessible synthesiser months ahead of schedule thanks to PGM.

1 Like

Amazing work, looks really cool!

I added the FocusContainerType here

The Slider text box is editable by default, so you should be able to enter into the text box to type a value. Did you try that? Otherwise I can have another look.
Maybe the FocusContainerType needs to be changed on the slider as well? since the text box is a sub component… I haven’t tried that yet.

Hi, I found the problem with editable slider text. Sadly the way in which VoiceOver places focus puts the actual cursor in the middle of the focused area. If I have the text box in the centre it will perform left click and edit.
Could you make a slight change to the way setTitle is applied. The focus container is part working but not announcing as a group. I have JUCE noticed that setTitle is applied to the guiItem but foleys_Container has focus container. I have just tried adding setTitle directly to the container and it works fine.

If the editor could apply it this way that would be fantastic.

That sounds reasonable. I would leave it to the designer to set a title, so let’s use the title property here as well:

setTitle (magicBuilder.getStyleProperty (IDs::accessibilityTitle, configNode).toString());

Let me know if that would work for you.

I’m sure that will work just fine. thank you

Hi, Just tested it out and the accessibility is amazing now thank you. I have just noticed that all the toggle buttons in my projects have started to malfunction. When mousing over or using voiceOver, selected buttons are unselecting also they will not select with mouse or keynav. Have there been any recent changes?

Thanks for the feedback. There was a change. It seems that the onStateChange fires on hover events too. I’ll have a look, how to only to react to toggle state changes.

No probs, I have reverted to the previous version I had but included the new container.cpp and everything works perfectly with the accessibility title. thank you for all the great work you put in, it is very much appreciated.

I think this commit should improve things for you:

For anybody wondering I attach some screenshots here about the new accessibility and where to find it

Focus Container

Title, description, help-text and focus-order

1 Like

hi toggle buttons are still acting strange. now when the projects open they show as selected but are not engaged. they can be unchecked but not checked again. I rebuilt the projects just to check but are all the same. sorry to be a pain but they are very useful for accessibility due to the way they announce to the screen reader.

Yes, the change I made above actually broke it. I will have to revert it. When using the onClick in combination with ButtonParameterAttachment doesn’t work, because ButtonParameterAttachment will send fake button clicks, which gets into a feedback loop.

1 Like