File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
pushnotifications/providers Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ import { CoreConfigConstants } from '../../../configconstants';
3434import { ILocalNotification } from '@ionic-native/local-notifications' ;
3535import { SQLiteDB } from '@classes/sqlitedb' ;
3636import { CoreSite } from '@classes/site' ;
37- import { CoreFilterProvider } from '@core/filter/providers/filter' ;
38- import { CoreFilterDelegate } from '@core/filter/providers/delegate' ;
3937
4038/**
4139 * Data needed to register a device in a Moodle site.
@@ -196,8 +194,6 @@ export class CorePushNotificationsProvider {
196194 platform : Platform ,
197195 appProvider : CoreAppProvider ,
198196 private sitesFactory : CoreSitesFactoryProvider ,
199- private filterProvider : CoreFilterProvider ,
200- private filterDelegate : CoreFilterDelegate
201197 ) {
202198 this . logger = logger . getInstance ( 'CorePushNotificationsProvider' ) ;
203199 this . appDB = appProvider . getDB ( ) ;
Original file line number Diff line number Diff line change @@ -473,8 +473,14 @@ export class CoreQuestionBaseComponent {
473473
474474 this . question . disabled = this . question . disabled && element . disabled ;
475475
476- // Get the label with the question text.
477- const label = questionEl . querySelector ( 'label[for="' + option . id + '"]' ) ;
476+ // Get the label with the question text. Try the new format first.
477+ const labelId = element . getAttribute ( 'aria-labelledby' ) ;
478+ let label = labelId ? questionEl . querySelector ( '#' + labelId . replace ( / : / g, '\\:' ) ) : undefined ;
479+ if ( ! label ) {
480+ // Not found, use the old format.
481+ label = questionEl . querySelector ( 'label[for="' + option . id + '"]' ) ;
482+ }
483+
478484 if ( label ) {
479485 option . text = label . innerHTML ;
480486
You can’t perform that action at this time.
0 commit comments