@@ -123,6 +123,31 @@ namespace OSFramework.OSUI.Behaviors {
123
123
124
124
// Method to set the focusable elements to be used
125
125
private _setFocusableElements ( includeTabIndexHidden = false ) : void {
126
+ /**
127
+ * NOTE: (MORE INFO @ROU-10963)
128
+ * We can find 2 sections below that must be explained:
129
+ * - TO BE REMOVED
130
+ * - After the missing part of the code is implemented (mentioned at the bullet point below), code inside this section should be removed!
131
+ * - TO KEEP
132
+ * - With this implementation we ensure that the focusable elements are not part of the inner patterns
133
+ * - However we still need to ensure focusable elements inside child patterns should be managed through their own FocusTrap
134
+ * - For now code is not prepared to it, but it should be considered in the future, that's why we keep this implementation commented
135
+ */
136
+
137
+ /* TO BE REMOVED • START ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• */
138
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
139
+ includeTabIndexHidden = false ;
140
+ this . _focusableElements = Helper . Dom . GetFocusableElements ( this . _targetElement , false ) ;
141
+ // Check if predicted elements exist at the _focusableElements
142
+ for ( const predictedElement of this . _focusableElements . filter (
143
+ ( item ) => item === this . _predictableTopElement || item === this . _predictableBottomElement
144
+ ) ) {
145
+ // If so, remove them from the array collection of _focusableElements
146
+ this . _focusableElements . splice ( this . _focusableElements . indexOf ( predictedElement ) , 1 ) ;
147
+ }
148
+ /* TO BE REMOVED • END ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• */
149
+
150
+ /* TO KEEP •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
126
151
// Ensure the list of focusable elements is empty
127
152
this._focusableElements.length = 0;
128
153
@@ -151,6 +176,7 @@ namespace OSFramework.OSUI.Behaviors {
151
176
}
152
177
}
153
178
}
179
+ ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• */
154
180
155
181
// Remove the first element from array, because of predictable top element added for trapping
156
182
this . _firstFocusableElement = this . _focusableElements [ 0 ] ;
0 commit comments