CN112306469A - Barrier-free component construction method, device, equipment and storage medium - Google Patents
Barrier-free component construction method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112306469A CN112306469A CN201910774120.XA CN201910774120A CN112306469A CN 112306469 A CN112306469 A CN 112306469A CN 201910774120 A CN201910774120 A CN 201910774120A CN 112306469 A CN112306469 A CN 112306469A
- Authority
- CN
- China
- Prior art keywords
- component
- barrier
- free
- information
- business
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010276 construction Methods 0.000 title claims abstract description 24
- 238000000034 method Methods 0.000 claims abstract description 50
- 230000004044 response Effects 0.000 claims abstract description 14
- 238000004590 computer program Methods 0.000 claims description 10
- 238000001514 detection method Methods 0.000 claims description 7
- 238000011161 development Methods 0.000 abstract description 31
- 230000008569 process Effects 0.000 abstract description 17
- 230000006870 function Effects 0.000 description 27
- 238000004806 packaging method and process Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 6
- 230000001771 impaired effect Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012858 packaging process Methods 0.000 description 1
- 238000007711 solidification Methods 0.000 description 1
- 230000008023 solidification Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the disclosure discloses a barrier-free component construction method, a barrier-free component construction device, barrier-free component equipment and a storage medium. The method comprises the following steps: detecting whether a business component is arranged at a target position with barrier-free access requirements or not in a current webpage; in response to a business component being set at a target location, acquiring a constructed base component corresponding to a barrier-free access requirement; determining configuration information according to the basic component and the business component; and when the basic component packages the business component, configuring the configuration information into the business component to construct the barrier-free component. According to the technical scheme of the embodiment of the disclosure, in the development process, as the basic component meets the international standard related to barrier-free access, the international standard does not need to be considered in the barrier-free component construction process based on the basic component; the barrier-free component is constructed on the basis of the service component, so that barrier-free access and service logic decoupling can be realized, and the development difficulty of barrier-free access is simplified.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of internet application, in particular to a barrier-free component construction method, device, equipment and storage medium.
Background
The vigorous development of internet technology leads to a new trend of social informatization, and nowadays, the internet becomes a necessary channel for information communication in daily use of people. However, most of the existing internet web pages do not consider the special situation of the disabled at the beginning of the design, and the barrier-free access characteristics of the web pages are poor, so that the disabled can encounter many difficulties when accessing the web pages.
For example, when a visually impaired person accesses a web page, the visually impaired person needs to use an auxiliary tool to acquire information on the web page, taking screen reading software as an example, the screen reading software can give feedback in real time after acquiring touch operation of the user, and exemplarily, the screen reading software can prompt the user of information of characters touched at the moment through voice. However, many information in the web page, such as pictures, videos, etc., have no corresponding web page elements for replacing characters, which makes it difficult for screen reading software to acquire the information. The existing solution is to perform special coding at each place of a web page that needs interaction, for example, perform special coding at a button, a picture, an input box, and the like, so that screen reading software can acquire the information, but this will increase development cost and reduce development efficiency.
Disclosure of Invention
The embodiment of the disclosure provides a barrier-free component construction method, a barrier-free component construction device, barrier-free component construction equipment and a storage medium, so that barrier-free access and service logic decoupling are realized, and development cost is reduced.
In a first aspect, an embodiment of the present disclosure provides an obstacle-free component constructing method, which may include:
detecting whether a business component is arranged at a target position with barrier-free access requirements or not in a current webpage;
in response to a business component being set at a target location, acquiring a constructed base component corresponding to a barrier-free access requirement;
determining configuration information according to the basic component and the business component;
and when the basic component packages the business component, configuring the configuration information into the business component to construct the barrier-free component.
In a second aspect, embodiments of the present disclosure also provide an obstacle-free component constructing apparatus, which may include:
the service component detection module is used for detecting whether a service component is arranged at a target position with barrier-free access requirements in a current webpage;
a basic component acquisition module for acquiring a constructed basic component corresponding to a barrier-free access requirement in response to a service component being set at a target position;
the configuration information determining module is used for determining configuration information according to the basic component and the business component;
and the barrier-free component constructing module is used for configuring the configuration information to the business component to construct the barrier-free component when the basic component packages the business component.
In a third aspect, an embodiment of the present disclosure further provides a terminal device, which may include:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the barrier-free component construction method provided by any embodiment of the present disclosure.
In a fourth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the barrier-free component building method provided in any embodiment of the present disclosure.
According to the technical scheme, in a development system, whether a business component is arranged at a target position with barrier-free access requirements or not is detected in a current webpage; if a business component is set in response to the target position, acquiring a constructed basic component corresponding to the barrier-free access requirement, wherein the basic component conforms to the international standard related to barrier-free access; determining configuration information to be configured according to the basic component and the business component on the basis of realizing barrier-free access requirements; furthermore, when the basic component packages the business component, the configuration information can be configured in the business component to construct a barrier-free component, and the barrier-free component can have barrier-free access and business functions at the same time. In the above technical solution, in the development process, firstly, since the base component has already met the international standard related to barrier-free access, the international standard does not need to be considered in the process of constructing the barrier-free component based on the base component; secondly, the barrier-free component is constructed on the basis of the service component, so that barrier-free access and service logic decoupling can be realized, the development difficulty of barrier-free access is simplified, and the development cost is reduced.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow chart of a method for barrier-free component construction in a first embodiment of the disclosure;
FIG. 2 is a flow chart of a barrier-free component construction method in a second embodiment of the disclosure;
fig. 3 is a block diagram of a barrier-free component construction apparatus in a third embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a terminal device in a fourth embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Before the embodiment of the present invention is introduced, an application scenario of the embodiment of the present invention is described:
the current web page may display a lot of content such as buttons, input boxes, text, pictures, videos, titles, etc., and in the case of buttons, different buttons may represent different meanings such as forward, backward, start, exit, zoom in, zoom out, etc. For example, a service component may be disposed at a target location of the current web page, and the service component is used to prompt a user to operate the target location or a corresponding function that can be implemented when operating the service component, for example, a button is disposed at the upper right corner of the current web page, and an identifier of "close" is disposed on the button, which is used to prompt the user to operate the target location or the service component can close the current web page. For another example, there may not be a service component set in the target position of the current webpage, because the information related to the display content in the target position can be directly obtained without prompting by the service component, and/or there is no information related to the display content in the target position that needs to be interacted with, for example, a dynamic image of "welcome to use the website" is presented in the target position, and the dynamic image is used for displaying only without interaction with the user.
In any case, however, the disabled, especially the visually impaired, cannot directly and visually acquire the information related to the display contents, and they need to be assisted by the aid of the auxiliary tool. For example, taking the screen reading software as an example, if the screen reading software can read the display content related information, it can prompt the disabled with the display content related information according to the read result so that the disabled can perform the next operation. It should be noted that, the information related to the display content that can be read by the assistant tool must meet the international standard related to barrier-free access, and therefore, when a developer develops a web page with barrier-free access characteristics, the developer needs to understand the international standard first and then develop the corresponding function used in cooperation with the assistant tool, which is difficult for the developer.
In order to solve this problem, the embodiments of the present disclosure provide a set of basic component library, which is constructed based on the above international standards, and in the basic component library, some configuration information related to barrier-free access characteristics may be configured, and it may package business components to construct barrier-free components, or may directly use as barrier-free components to be used alone. Therefore, when developing the webpage, a developer can directly utilize the set of basic component library to develop the webpage which meets the international standard and has the barrier-free access characteristic, and does not need to carry out special coding at each position of the webpage needing interaction or understand the international standard, so that the development cost can be obviously reduced and the development efficiency can be improved.
Example one
Fig. 1 is a flowchart of a barrier-free component construction method provided in a first embodiment of the present disclosure. The method and the device are suitable for the situation that barrier-free components meeting international standards are constructed based on constructed basic components, and are particularly suitable for the situation that barrier-free access and service logic decoupling barrier-free components are constructed. The method can be executed by the barrier-free component constructing device provided by the embodiment of the disclosure, the device can be realized by software and/or hardware, and the device can be integrated on various user terminal devices or servers.
Referring to fig. 1, the method of the embodiment of the present disclosure specifically includes the following steps:
s110, detecting whether a business component is arranged in a target position with barrier-free access requirements or not in the current webpage.
In the development system, for the disabled, especially the visually impaired, most of the display content related information in the current webpage cannot be directly obtained by naked eyes, that is, the display content related information has a barrier-free access requirement. If business components are placed at these target locations where there is an unobstructed need, the unobstructed components can be built on the basis of the business components. Therefore, whether a business component is arranged in a target position with barrier-free access requirements or not can be detected, and then how to construct the barrier-free component can be determined according to the detection result.
And S120, responding to the business component arranged at the target position, and acquiring the constructed basic component corresponding to the barrier-free access requirement.
If the target position of the business component in the current webpage page has a barrier-free access requirement, or the business component has a barrier-free access requirement, responding to the situation that the business component is arranged at the target position, and acquiring a constructed basic component corresponding to the barrier-free access requirement. Illustratively, a button is arranged at the upper right corner of the current webpage page, and an identifier of "close" is arranged on the button, so that the current webpage page can be closed by prompting the user to operate the target position, and obviously, the target position has an accessible access requirement without obstacle, and a constructed basic component can be obtained.
It should be noted that the constructed basic component may be regarded as an abstraction of the general logic in the barrier-free access process, and may not contain any component information, or may contain some component information related to the barrier-free access characteristics. More importantly, the base component is a component that conforms to international standards related to barrier-free access, and international standards need not be considered in building barrier-free components based on the base component.
And S130, determining configuration information according to the basic component and the business component.
Wherein, normally, the basic component itself may not work directly, but it can be used in combination with the business component in the current webpage, i.e. the business component is packaged based on the basic component to construct the barrier-free component. It should be noted that, when packaging the business component based on the basic component, component information related to barrier-free access, such as description information, role information, and the like, needs to be configured. Thus, before performing the wrapping step, configuration information to be configured, i.e. component information related to the business component for barrier-free access, can be determined from the base component and the business component, since the requirements for barrier-free access of different business components may differ.
S140, when the basic component packages the business component, the configuration information is configured in the business component to construct the barrier-free component.
Component information which is not contained in the base component and is related to the barrier-free access can be transmitted in a packaging link, namely, when the base component packages the business component, the component information related to the barrier-free access is configured, and the component information is the configuration information. Therefore, when the basic component packages the business component, the configuration information can be configured into the business component to construct the barrier-free component, or the configuration information can be configured into the configuration file of the business component to construct the barrier-free component. In this way, the barrier-free component carries the relevant component information, i.e. it can have both the component information of the service component and the component information for barrier-free access.
Therefore, the barrier-free component obtained based on the steps can simultaneously have barrier-free access and service functions, and the service can be various user requirements, such as closing the current webpage, adjusting the brightness and the like. It should be noted that packaging is actually the way an element is constructed, i.e. the way an element is constructed without obstacles. Therefore, compared with the prior art, the barrier-free component in the embodiment of the disclosure can also have barrier-free access and service functions, but in the development process, the service component can only focus on the service logic of the service component, and barrier-free access decoupled from the service logic can be placed in the basic component for processing, so that the development cost can be obviously reduced, and no influence is caused on the realization of the current webpage.
Illustratively, if a business component for closing the current web page is loaded in the current web page, the component information of the business component is: when the clicking operation is monitored at the target position, closing the current webpage; and the barrier-free access associated with the business component is: button and close the current web page. Then, in the development system, the business component may implement a function of closing the current web page, and the basic component may not contain any component information, at this time, the barrier-free access and the business logic are already split. When the basic component packages the business component, the following configuration information is configured into the business component: role information (buttons) and description information (close current web page), thereby building a barrier-free component.
In other words, it is understood that in the front-end field, a web page may be considered as a result of data being input into a function, that is, the web page is f (data), where the function f is a component. The function needs to complete the thing that receives the data that the web page needs to be presented, and the data can be described as the state to be presented through the function, thereby becoming a web page. Thus, by wrapping it is understood that a function returns a result or a function (component) after receiving some data, and the final realized web page is nested layer by layer. In the disclosed embodiment, the configuration information is data, and in the packaging process, the configuration information is used as input, and the business component is used as a function, so that the obtained result is an unobstructed component.
According to the technical scheme, in a development system, whether a business component is arranged at a target position with barrier-free access requirements or not is detected in a current webpage; if a business component is set in response to the target position, acquiring a constructed basic component corresponding to the barrier-free access requirement, wherein the basic component conforms to the international standard related to barrier-free access; determining configuration information to be configured according to the basic component and the business component on the basis of realizing barrier-free access requirements; furthermore, when the basic component packages the business component, the configuration information can be configured in the business component to construct a barrier-free component, and the barrier-free component can have barrier-free access and business functions at the same time. In the above technical solution, in the development process, firstly, since the base component has already met the international standard related to barrier-free access, the international standard does not need to be considered in the process of constructing the barrier-free component based on the base component; secondly, the barrier-free component is constructed on the basis of the service component, so that barrier-free access and service logic decoupling can be realized, the development difficulty of barrier-free access is simplified, and the development cost is reduced.
It should be noted that, first, the reason for achieving the barrier-free access and the decoupling of the service logic is that: the barrier-free component is pre-obtained by packaging the business component based on the base component, wherein the base component can be used for realizing barrier-free access, and the business component can be used for realizing business functions. In this way, since there is no correlation between barrier-free access and business logic, barrier-free access is completed outside the business logic, so that when building a business component, barrier-free access can be separated from the business logic, and each business logic can only focus on its own content, thereby realizing the decoupling and splitting of barrier-free access and business logic. As for the barrier-free access function, a basic component can be constructed for independent processing, and the barrier-free component obtained by packaging the service component based on the basic component can realize the decoupling of the barrier-free access and the service logic on the basis of simultaneously realizing the barrier-free access and the service function, so that the service logic of the service component is simpler, and the barrier-free access development difficulty can be simplified.
In other words, the reason for decoupling the barrier-free access from the business logic is that the business logic is a layer of the front-end interface, and there are many contents to be completed in the business logic, for example, a list is requested from the server and displayed, a process of processing a commodity ordered by a user is processed, a webpage related to a keyword is searched, and the like. Unobstructed access may be considered to be sporadic content as compared to such complete content. If the implementation of barrier-free access is also written into the business logic, the business logic is made more complex, and the entire content needs to be focused on and the scattered content needs to be focused on, which obviously increases the development cost.
Secondly, after the barrier-free component is built, the barrier-free component can be loaded into the current webpage page through the following steps: when a current webpage is initialized, a configuration file of the barrier-free component to be loaded is obtained, and the barrier-free component is loaded according to the configuration file. Typically, the barrier-free components are pre-obtained in the development phase or the compilation phase, i.e., the business components are packaged based on the base components. Only when the current webpage is initialized, the configuration file of the barrier-free component to be loaded can be obtained, and the barrier-free component which is constructed in advance is loaded according to the configuration file.
Example two
Fig. 2 is a flowchart of a barrier-free component construction method provided in the second embodiment of the present disclosure. The present embodiment is optimized based on the first embodiment. In this embodiment, the base component may be pre-constructed by: if the shared component information exists, constructing a basic component based on the shared component information, wherein the shared component information is used for realizing barrier-free access; correspondingly, determining the configuration information according to the basic component and the business component may include: and determining difference component information between the preset component information and the common component information, and taking the difference component information as configuration information.
Correspondingly, as shown in fig. 2, the method of this embodiment may specifically include the following steps:
s210, detecting whether a business component is arranged in a target position with barrier-free access requirements or not in the current webpage.
S220, responding to the service component arranged at the target position, and acquiring a constructed basic component corresponding to the barrier-free access requirement, wherein the basic component is constructed in advance through the following steps: if there is common component information, the base component is constructed based on the common component information, and the common component information is used to enable barrier-free access.
Wherein, the components can be subdivided into actual components and abstract components, the actual components are directly visible components, such as buttons, input boxes, pictures, titles, text boxes and the like; accordingly, an abstract component may be a component that is not directly visible, built based on some component information. When abstract and actual components are mated, the actual components may also possess component information for the abstract components. Likewise, taking the component information for unobstructed access as an example, if the component information for unobstructed access related to a plurality of business components in the current web page is the same, it is possible to take these component information as common component information and construct a base component based on the common component information. For example, if the common component information is that the role information is a button, the role information in the base component thus constructed is cured to be a button. When the more the common component information is, the more the solidification information in the basic component is constructed, and thus, when the business component is packaged based on the basic component, the less the configuration information is configured in the business component, the simpler the development process of the barrier-free component. This is because, if the configuration information configured into the business component is component information that is not included in the base component and is necessary for achieving barrier-free access, the more common component information that is solidified in the base component for achieving barrier-free access, the less configuration information to be configured.
And S230, determining difference component information between the preset component information and the common component information, and taking the difference component information as configuration information.
The preset component information may be necessary component information for implementing barrier-free access, such as role information and description information; accordingly, the common component information may include role information and/or description information. Wherein the role information can be used to describe the role of the barrier-free component, such as a button, an input box, a picture, a title, a text box, etc.; the descriptive information may be used to illustrate the substance of the barrier-free component, such as closing the current web page, adjusting the brightness, and so forth.
Illustratively, if there are 3 business components A, B and C in the current web page, the 3 business components are all buttons and all have unobstructed access requirements, and when the 3 buttons are clicked, "close the current web page", "go forward", and "go back", respectively, can be realized. Then, in the development process, the common component information may be buttons (character information), 1 base component D is constructed based on the common component information, and A, B and C are packaged based on D, respectively, thereby constructing barrier-free components a1, B1, and C1. Taking the example of packaging a based on D, the configuration information required to be configured in a is description information, such as closing the current web page.
S240, when the basic component packages the business component, the configuration information is configured in the business component to construct the barrier-free component.
According to the technical scheme of the embodiment of the disclosure, if the common component information exists, the basic component is constructed based on the common component information, the difference component information between the preset component information and the common component information can be determined, and the difference component information is used as the configuration information to be configured. The advantage of this arrangement is that the basic component constructed based on the common component information can be considered as an abstraction of the common component information, so that the basic component can be reused, i.e. when a lot of business components are packaged, the same basic component can be used without writing similar point codes at different places in the business logic. Moreover, when the common component information is changed, all basic components related to the common component information can be changed by changing the common component information at one position, and the embedded point codes at a plurality of positions are not required to be changed in the service logic, so that the possibility of error occurrence can be obviously reduced, and the changing efficiency can be improved.
It should be noted that the basic component may be pre-constructed by the common component information, may be pre-constructed by the component type of the service component, or may be pre-constructed by the common component information and the component type of the service component. This is because the component types of the common component information and the business component are contents of completely different levels, and the basic component can be constructed from a plurality of angles. For the case that the basic component is pre-constructed by the component type of the business component, specifically, the component type of the business component may be obtained, and the basic component is constructed according to the component type, where the component type may include a fact component and/or an Vue component. This is because the packaging form of the service component may be different in different front-end technology systems, and the service components of different component types correspond to different packaging forms, for example, if the component type is Vue component, the packaging of Vue component may be implemented by a design instruction (directive); if the component type is a reach component, packaging of the reach component can be achieved through a high-order component (HOC); and so on.
In fact, in a simple way, components may be nested into each other, for example, a high-level component may wrap a low-level component, and then wrapping a business component may be understood as constructing a base component that is higher in level than the business component, so that the business component may be wrapped based on the base component, for example, if the component type is a read component, the base component may be a high-level component (HOC). Therefore, if the React component needs to be supported, a set of basic components matched with the React component can be constructed; if Vue components need to be supported, a set of base components can be constructed that match Vue components. In fact, the basic component libraries matched with the fact component and the Vue component can be respectively constructed in advance, so that the corresponding basic component libraries can be directly provided for developers in the development process, and the development cost is simplified.
An optional scheme is that, in response to that no service component is set at a target position, that is, no service component is set at a target position where a barrier-free access requirement exists, a barrier-free component corresponding to the barrier-free access requirement may be directly constructed, where the barrier-free component may be from a set of basic component library having a barrier-free access characteristic, and at this time, a successful construction may be achieved only by selecting a suitable basic component from the basic component library and configuring suitable configuration information in the basic component. For example, if there is a barrier-free access requirement for obtaining picture information at a target position of a current web page, a barrier-free component corresponding to the barrier-free access requirement may include a "picture" (role information) and a "welcome to use this website" (description information). Then, a basic component whose role information is solidified into a picture can be selected from the basic component library, and then in the process of developing the webpage, the basic component is configured with 'welcome to use the website'. Alternatively, if the role information and description information of one base component in the base component library have been solidified into a state to be built, this base component can be directly used as an unobstructed component.
EXAMPLE III
Fig. 3 is a block diagram of a barrier-free component constructing apparatus according to a third embodiment of the present disclosure, which is configured to execute the barrier-free component constructing method according to any of the above embodiments. The device and the method for constructing the barrier-free component in the above embodiments belong to the same inventive concept, and details that are not described in detail in the embodiments of the barrier-free component constructing device may refer to the embodiments of the barrier-free component constructing method. Referring to fig. 3, the apparatus may include: a business component detection module 310, a base component acquisition module 320, a configuration information determination module 330, and an unobstructed component construction module 340.
The service component detection module 310 is configured to detect whether a service component is set in a target location with barrier-free access requirements in a current webpage;
a base component acquisition module 320 for acquiring a constructed base component corresponding to an unobstructed access requirement in response to a business component being set at a target location;
a configuration information determining module 330, configured to determine configuration information according to the basic component and the business component;
the barrier-free component constructing module 340 is configured to configure the configuration information into the business component to construct the barrier-free component when the basic component packages the business component.
Optionally, on this basis, the foundation component may be pre-constructed by the following modules:
a first base component construction module for constructing a base component based on the common component information if the common component information exists, wherein the common component information is used for realizing barrier-free access;
accordingly, the barrier-free component construction module 340 may be specifically configured to:
and determining difference component information between the preset component information and the common component information, and taking the difference component information as configuration information to be configured.
Optionally, the preset component information may include role information and description information; the common component information may include role information and/or description information.
Optionally, on this basis, the foundation component may be pre-constructed by the following modules:
and the second basic component building module is used for acquiring the component type of the business component and building the basic component according to the component type.
Optionally, the component types may include a React component and/or an Vue component.
Optionally, on this basis, the apparatus may further include:
and the barrier-free component obtaining module is used for constructing a barrier-free component corresponding to the barrier-free access requirement when no business component is set aiming at the target position.
Optionally, the barrier-free component may be loaded into the current webpage through the following modules:
when a current webpage is initialized, a configuration file of the barrier-free component to be loaded is obtained, and the barrier-free component is loaded according to the configuration file.
In the barrier-free component construction device provided by the third embodiment of the disclosure, in a development system, in a current webpage, whether a service component is arranged at a target position with a barrier-free access requirement is detected by a service component detection module; the base component acquisition module may acquire a constructed base component corresponding to a barrier-free access requirement, the base component conforming to an international standard relating to barrier-free access; based on the barrier-free access requirement, the configuration information determining module can determine the configuration information to be configured according to the basic component and the business component; furthermore, when the basic component packages the service component, the barrier-free component construction module can configure the configuration information into the service component to construct the barrier-free component, and the barrier-free component can have barrier-free access and service functions at the same time. In the device, during the development process, firstly, because the basic component meets the international standard related to barrier-free access, the international standard does not need to be considered during the process of constructing the barrier-free component based on the basic component; secondly, the barrier-free component is constructed on the basis of the service component, so that barrier-free access and service logic decoupling can be realized, the development difficulty of barrier-free access is simplified, and the development cost is reduced.
The barrier-free component constructing device provided by the embodiment of the disclosure can execute the barrier-free component constructing method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the executing method.
It should be noted that, in the embodiment of the barrier-free component constructing apparatus, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present disclosure.
Example four
Referring now to fig. 4, a schematic diagram of an electronic device (e.g., the terminal device or the server in fig. 4) 600 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
EXAMPLE five
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: detecting whether a business component is arranged at a target position with barrier-free access requirements or not in a current webpage; in response to a business component being set at a target location, acquiring a constructed base component corresponding to a barrier-free access requirement; determining configuration information according to the basic component and the business component; and when the basic component packages the business component, configuring the configuration information into the business component to construct the barrier-free component.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation on the unit itself, for example, the base component acquisition module may also be described as "acquiring a constructed base component corresponding to an unobstructed access need in response to a business component being provided at a target location.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, [ example one ] there is provided an obstacle-free component construction method, which may include:
detecting whether a business component is arranged at a target position with barrier-free access requirements or not in a current webpage;
in response to a business component being set at a target location, acquiring a constructed base component corresponding to a barrier-free access requirement;
determining configuration information according to the basic component and the business component;
and when the basic component packages the business component, configuring the configuration information into the business component to construct the barrier-free component.
According to one or more embodiments of the present disclosure, [ example two ] there is provided a method of example one, the foundation component may be pre-built by:
if the shared component information exists, constructing a basic component based on the shared component information, wherein the shared component information is used for realizing barrier-free access;
correspondingly, determining the configuration information according to the basic component and the business component may include:
and determining difference component information between the preset component information and the common component information, and taking the difference component information as configuration information.
According to one or more embodiments of the present disclosure, [ example three ] there is provided the method of example two, the preset component information includes role information and description information; the common component information includes role information and/or description information.
According to one or more embodiments of the present disclosure, [ example four ] there is provided the method of example one, the foundation component may be pre-built by:
and acquiring the component type of the service component, and constructing a basic component according to the component type.
According to one or more embodiments of the present disclosure, [ example five ] providing the method of example four, the component types may include a read component and/or an Vue component.
In accordance with one or more embodiments of the present disclosure, [ example six ] there is provided an example method, which may further comprise: in response to no business component being set at the target location, a barrier-free component corresponding to the barrier-free access requirement is constructed.
According to one or more embodiments of the present disclosure, [ example seven ] providing the method of any of example six, the barrier-free component may be loaded into the current web page by:
when a current webpage is initialized, a configuration file of the barrier-free component to be loaded is obtained, and the barrier-free component is loaded according to the configuration file.
According to one or more embodiments of the present disclosure, [ example eight ] there is provided an obstacle-free component building apparatus, which may include:
the service component detection module is used for detecting whether a service component is arranged at a target position with barrier-free access requirements in a current webpage;
a basic component acquisition module for acquiring a constructed basic component corresponding to a barrier-free access requirement in response to a service component being set at a target position;
the configuration information determining module is used for determining configuration information according to the basic component and the business component;
and the barrier-free component constructing module is used for configuring the configuration information to the business component to construct the barrier-free component when the basic component packages the business component.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims (10)
1. A method of barrier-free component construction, comprising:
detecting whether a business component is arranged at a target position with barrier-free access requirements or not in a current webpage;
responding to the business component arranged at the target position, and acquiring a constructed basic component corresponding to the barrier-free access requirement;
determining configuration information according to the basic component and the business component;
configuring the configuration information into the business component to construct an unobstructed component when the business component is wrapped by the base component.
2. The method of claim 1, wherein the base component is pre-constructed by:
constructing the base component based on the common component information if the common component information exists, wherein the common component information is used for realizing barrier-free access;
and said determining configuration information from said base component and said business component comprises:
and determining difference component information between preset component information and the common component information, and taking the difference component information as configuration information.
3. The method of claim 2, wherein the preset component information includes role information and description information; the common component information includes the role information and/or the description information.
4. The method of claim 1, wherein the base component is pre-constructed by:
and acquiring the component type of the service component, and constructing the basic component according to the component type.
5. The method of claim 4, wherein the component types include React components and/or Vue components.
6. The method of claim 1, further comprising:
in response to the business component not being set at the target location, constructing a barrier-free component corresponding to the barrier-free access requirement.
7. The method of any of claims 1-6, wherein the barrier-free component is loaded into the current web page by:
and when the current webpage is initialized, acquiring a configuration file of the barrier-free component to be loaded, and loading the barrier-free component according to the configuration file.
8. An unobstructed assembly build device, comprising:
the service component detection module is used for detecting whether a service component is arranged at a target position with barrier-free access requirements in a current webpage;
a basic component acquisition module, configured to acquire a constructed basic component corresponding to the barrier-free access requirement in response to the setting of the business component at the target location;
the configuration information determining module is used for determining configuration information according to the basic component and the business component;
and the barrier-free component constructing module is used for configuring the configuration information into the business component to construct the barrier-free component when the basic component packages the business component.
9. A terminal device, characterized in that the terminal device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of barrier-free component construction as claimed in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the barrier-free assembly building method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910774120.XA CN112306469A (en) | 2019-08-21 | 2019-08-21 | Barrier-free component construction method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910774120.XA CN112306469A (en) | 2019-08-21 | 2019-08-21 | Barrier-free component construction method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112306469A true CN112306469A (en) | 2021-02-02 |
Family
ID=74486710
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910774120.XA Pending CN112306469A (en) | 2019-08-21 | 2019-08-21 | Barrier-free component construction method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112306469A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114911535A (en) * | 2022-04-22 | 2022-08-16 | 青岛海尔科技有限公司 | Application program component configuration method, storage medium and electronic device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108762729A (en) * | 2018-05-07 | 2018-11-06 | 北京五八信息技术有限公司 | A kind of method, apparatus of page makeup, computer equipment and storage medium |
CN108958736A (en) * | 2018-07-20 | 2018-12-07 | 北京三快在线科技有限公司 | Page generation method, device, electronic equipment and computer-readable medium |
CN109491646A (en) * | 2018-10-18 | 2019-03-19 | 北京字节跳动网络技术有限公司 | A kind of message input method, device, electronic equipment and readable medium |
CN109947388A (en) * | 2019-04-15 | 2019-06-28 | 腾讯科技(深圳)有限公司 | The page broadcasts control method, device, electronic equipment and the storage medium of reading |
-
2019
- 2019-08-21 CN CN201910774120.XA patent/CN112306469A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108762729A (en) * | 2018-05-07 | 2018-11-06 | 北京五八信息技术有限公司 | A kind of method, apparatus of page makeup, computer equipment and storage medium |
CN108958736A (en) * | 2018-07-20 | 2018-12-07 | 北京三快在线科技有限公司 | Page generation method, device, electronic equipment and computer-readable medium |
CN109491646A (en) * | 2018-10-18 | 2019-03-19 | 北京字节跳动网络技术有限公司 | A kind of message input method, device, electronic equipment and readable medium |
CN109947388A (en) * | 2019-04-15 | 2019-06-28 | 腾讯科技(深圳)有限公司 | The page broadcasts control method, device, electronic equipment and the storage medium of reading |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114911535A (en) * | 2022-04-22 | 2022-08-16 | 青岛海尔科技有限公司 | Application program component configuration method, storage medium and electronic device |
CN114911535B (en) * | 2022-04-22 | 2023-12-19 | 青岛海尔科技有限公司 | Application program component configuration method, storage medium and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112306487B (en) | Buried point data reporting method, device, equipment and storage medium | |
US20220374538A1 (en) | Permission control method and device and electronic equipment | |
CN111291244B (en) | House source information display method, device, terminal and storage medium | |
CN111400625B (en) | Page processing method and device, electronic equipment and computer readable storage medium | |
CN110865846B (en) | Application management method, device, terminal, system and storage medium | |
CN112183045B (en) | Online document processing method and device and electronic equipment | |
CN111459364B (en) | Icon updating method and device and electronic equipment | |
CN111596991A (en) | Interactive operation execution method and device and electronic equipment | |
EP4231143A1 (en) | Information display method and apparatus, electronic device, and computer readable storage medium | |
CN110619100A (en) | Method and apparatus for acquiring data | |
CN114417782A (en) | Display method and device and electronic equipment | |
CN110618811B (en) | Information presentation method and device | |
CN112256221A (en) | Information display method and device and electronic equipment | |
CN110619101B (en) | Method and apparatus for processing information | |
CN112306469A (en) | Barrier-free component construction method, device, equipment and storage medium | |
CN115630197A (en) | Media content processing method and device and electronic equipment | |
CN111309323B (en) | Parameter initialization method and device and electronic equipment | |
CN111290812B (en) | Display method, device, terminal and storage medium of application control | |
JP2023527174A (en) | Video special effect arrangement method, video special effect arrangement device, device and storage medium | |
CN112333462A (en) | Live broadcast room page jumping method, returning device and electronic equipment | |
CN110099122B (en) | Method and apparatus for sending network request | |
CN114706645B (en) | Interface information transmission method, device, medium and electronic equipment | |
CN111310031B (en) | House source information display method, device, terminal and storage medium | |
CN111796802B (en) | Function package generation method and device and electronic equipment | |
CN117667047A (en) | Method, device, equipment and medium for generating function template |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |