apps/system/js/task_manager.js
/**
   * Update our bookkeeping for when the scroll position changes, used
   * primarily for updating cards' accessibility attributes.
   */
Update our bookkeeping for when the scroll position changes, used
primarily for updating cards' accessibility attributes.
Update our bookkeeping for when the scroll position changes used primarily for updating cards ' accessibility attributes .
updateScrollPosition(initial) {
    var index = initial ? StackManager.position : this.getCurrentIndex();
    var currentCard = this.appToCardMap.get(this.stack[index]);
    if (this.currentCard !== currentCard) {
      this.currentCard = currentCard;
      this.stack.forEach((app, idx) => {
        var card = this.appToCardMap.get(app);
        card.element.setAttribute('aria-hidden', card !== currentCard);
        card.element.setAttribute('aria-setsize', this.stack.length);
        card.element.setAttribute('aria-posinset', idx + 1);
      });
    }
  }
updateScrollPosition ( initial ) { var index = initial ? StackManager . position : this . getCurrentIndex ( ) ; var currentCard = this . appToCardMap . get ( this . stack [ index ] ) ; if ( this . currentCard !== currentCard ) { this . currentCard = currentCard ; this . stack . forEach ( ( app , idx ) => { var card = this . appToCardMap . get ( app ) ; card . element . setAttribute ( 'aria-hidden' , card !== currentCard ) ; card . element . setAttribute ( 'aria-setsize' , this . stack . length ) ; card . element . setAttribute ( 'aria-posinset' , idx + 1 ) ; } ) ; } }
Update our bookkeeping for when the scroll position changes, used
 primarily for updating cards' accessibility attributes.
Update our bookkeeping for when the scroll position changes used primarily for updating cards ' accessibility attributes .
// Skipping the layout flush inducing getCurrentIndex on the first rendering // Hide non-current apps from the screen reader. // Update the screen reader card list size. // Update the screen reader card index.