mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-14 00:14:18 +00:00
Accessibility: Avoid allowing TextEditor and Viewport internal components to be accessibility-focused
The TextHolderComponent and Viewport::componentHolder don't have any accessible semantics, so they shouldn't be included in the accessible component hierarchy.
This commit is contained in:
parent
edddca5ac3
commit
53484db875
2 changed files with 20 additions and 1 deletions
|
|
@ -337,8 +337,16 @@ protected:
|
|||
|
||||
private:
|
||||
//==============================================================================
|
||||
class AccessibilityIgnoredComponent : public Component
|
||||
{
|
||||
std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override
|
||||
{
|
||||
return createIgnoredAccessibilityHandler (*this);
|
||||
}
|
||||
};
|
||||
|
||||
std::unique_ptr<ScrollBar> verticalScrollBar, horizontalScrollBar;
|
||||
Component contentHolder;
|
||||
AccessibilityIgnoredComponent contentHolder;
|
||||
WeakReference<Component> contentComp;
|
||||
Rectangle<int> lastVisibleArea;
|
||||
int scrollBarThickness = 0;
|
||||
|
|
|
|||
|
|
@ -868,6 +868,12 @@ struct TextEditor::TextHolderComponent : public Component,
|
|||
|
||||
TextEditor& owner;
|
||||
|
||||
private:
|
||||
std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override
|
||||
{
|
||||
return createIgnoredAccessibilityHandler (*this);
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (TextHolderComponent)
|
||||
};
|
||||
|
||||
|
|
@ -894,6 +900,11 @@ struct TextEditor::TextEditorViewport : public Viewport
|
|||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override
|
||||
{
|
||||
return createIgnoredAccessibilityHandler (*this);
|
||||
}
|
||||
|
||||
TextEditor& owner;
|
||||
int lastWordWrapWidth = 0;
|
||||
bool reentrant = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue