Makes new files search results read once per search

closes CNVS-16898

Test Plan:
  - Enable New Files
  - Go to New Files
  - Enable a Screenreader
  - Search for something
  - The results should be read to you.
  - Search for something else
  - Only results for your something else should be read.

Change-Id: Ia479e68e04d3d3285c0ccd1d27180e49bf90c5d2
Reviewed-on: https://gerrit.instructure.com/44461
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
This commit is contained in:
Clay Diffrient 2014-11-14 11:23:03 -07:00
parent 6cf500f895
commit 5a0003d3d4
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ define [
forceUpdate = =>
@setState({errors: null})
@forceUpdate() if @isMounted()
$.screenReaderFlashMessage I18n.t('results_count', "Showing %{num_results} search results", {num_results: @state.collection.length})
$.screenReaderFlashMessageExclusive I18n.t('results_count', "Showing %{num_results} search results", {num_results: @state.collection.length})
@state.collection.fetch({data: props.query, error: @onFetchError}).then(forceUpdate)
# TODO: use scroll position to only fetch the pages we need
.then getAllPages.bind(null, @state.collection, forceUpdate)
@ -113,4 +113,4 @@ define [
FilePreview
params: @props.params
query: @props.query
collection: @state.collection
collection: @state.collection